add content_type property in request
This commit is contained in:
parent
4fdf340d04
commit
aac99c45c0
|
@ -174,6 +174,10 @@ class Request(dict):
|
||||||
# so pull it from the headers
|
# so pull it from the headers
|
||||||
return self.headers.get('Host', '')
|
return self.headers.get('Host', '')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def content_type(self):
|
||||||
|
return self.headers.get('Content-Type', DEFAULT_HTTP_CONTENT_TYPE)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def path(self):
|
def path(self):
|
||||||
return self._parsed_url.path.decode('utf-8')
|
return self._parsed_url.path.decode('utf-8')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user