add __repr__ for sanic request
This commit is contained in:
parent
9fb8bec715
commit
12dafd07b8
|
@ -68,6 +68,11 @@ class Request(dict):
|
||||||
self._cookies = None
|
self._cookies = None
|
||||||
self.stream = None
|
self.stream = None
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
if self.method is None or not self._parsed_url:
|
||||||
|
return '<%s>' % self.__class__.__name__
|
||||||
|
return '<%s: %s %r>' % (self.__class__.__name__, self.method, self.path)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def json(self):
|
def json(self):
|
||||||
if self.parsed_json is None:
|
if self.parsed_json is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user