add response.reason

#588
This commit is contained in:
Kenneth Reitz
2012-06-15 14:37:33 -04:00
parent f5d1d0d27a
commit c7514faf4a
+5
View File
@@ -815,6 +815,11 @@ class Response(object):
except ValueError:
return None
@property
def reason(self):
"""The HTTP Reason for the response."""
return self.raw.reason
def raise_for_status(self, allow_redirects=True):
"""Raises stored :class:`HTTPError` or :class:`URLError`, if one occurred."""