add response.reason
authorKenneth Reitz <me@kennethreitz.com>
Fri, 15 Jun 2012 18:37:33 +0000 (14:37 -0400)
committerKenneth Reitz <me@kennethreitz.com>
Fri, 15 Jun 2012 18:37:33 +0000 (14:37 -0400)
#588

requests/models.py

index fbf7fc6..47316ea 100644 (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."""