diff --git a/sanic/request.py b/sanic/request.py index f3de36f8..a5d204a8 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -174,6 +174,10 @@ class Request(dict): # so pull it from the headers return self.headers.get('Host', '') + @property + def content_type(self): + return self.headers.get('Content-Type', DEFAULT_HTTP_CONTENT_TYPE) + @property def path(self): return self._parsed_url.path.decode('utf-8')