From 3443c177a3b8279b6c5b5ce9c1643689d8983521 Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Wed, 5 Feb 2014 17:29:09 +0000 Subject: [PATCH] Document the `Response.reason` attribute. Made `.status_code` and `.reason` consistent with one another, adding some examples. Addresses #1225. --- requests/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requests/models.py b/requests/models.py index 6270a691..78832054 100644 --- a/requests/models.py +++ b/requests/models.py @@ -517,7 +517,7 @@ class Response(object): self._content = False self._content_consumed = False - #: Integer Code of responded HTTP Status. + #: Integer Code of responded HTTP Status, e.g. 404 or 200. self.status_code = None #: Case-insensitive Dictionary of Response Headers. @@ -541,6 +541,7 @@ class Response(object): #: up here. The list is sorted from the oldest to the most recent request. self.history = [] + #: Textual reason of responded HTTP Status, e.g. "Not Found" or "OK". self.reason = None #: A CookieJar of Cookies the server sent back.