add __repr__ for sanic request
This commit is contained in:
parent
f6eb35f67d
commit
074d36eeba
|
@ -71,10 +71,10 @@ class Request(dict):
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
if self.method is None or not self.path:
|
if self.method is None or not self.path:
|
||||||
return '<{class_name}>'.format(class_name=self.__class__.__name__)
|
return '<{0}>'.format(self.__class__.__name__)
|
||||||
return '<{class_name}: {method} {path}>'.format(class_name=self.__class__.__name__,
|
return '<{0}: {1} {2}>'.format(self.__class__.__name__,
|
||||||
method=self.method,
|
self.method,
|
||||||
path=self.path)
|
self.path)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def json(self):
|
def json(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user