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