From c7514faf4aa55be634d6e25ce16eb72974b948ae Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 15 Jun 2012 14:37:33 -0400 Subject: [PATCH] add response.reason #588 --- requests/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/requests/models.py b/requests/models.py index fbf7fc6..47316ea 100644 --- a/requests/models.py +++ b/requests/models.py @@ -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.""" -- 2.7.4