Get rid of the _token attribute altogether

This commit is contained in:
Eli Uriegas 2017-04-21 17:13:18 -05:00 committed by GitHub
parent e48fc22513
commit 6462816aea

View File

@ -38,7 +38,7 @@ class Request(dict):
__slots__ = ( __slots__ = (
'app', 'headers', 'version', 'method', '_cookies', 'transport', 'app', 'headers', 'version', 'method', '_cookies', 'transport',
'body', 'parsed_json', 'parsed_args', 'parsed_form', 'parsed_files', 'body', 'parsed_json', 'parsed_args', 'parsed_form', 'parsed_files',
'_ip', '_parsed_url', '_token', '_ip', '_parsed_url',
) )
def __init__(self, url_bytes, headers, version, method, transport): def __init__(self, url_bytes, headers, version, method, transport):
@ -77,9 +77,7 @@ class Request(dict):
:return: token related to request :return: token related to request
""" """
self._token = getattr(self, '_token', return self.headers.get('Authorization', None)
self.headers.get('Authorization'))
return self._token
@property @property
def form(self): def form(self):