Document and initialise Response.request
authorCory Benfield <lukasaoz@gmail.com>
Mon, 26 May 2014 15:40:45 +0000 (16:40 +0100)
committerCory Benfield <lukasaoz@gmail.com>
Mon, 26 May 2014 15:40:45 +0000 (16:40 +0100)
requests/models.py

index 120968ff5119363bb5c569c1d9398f2b52cabf31..5475c14c8737b3c9d14339550f02898ad78a654d 100644 (file)
@@ -556,6 +556,10 @@ class Response(object):
         #: and the arrival of the response (as a timedelta)
         self.elapsed = datetime.timedelta(0)
 
+        #: The :class:`PreparedRequest <PreparedRequest>` object to which this
+        #: is a response.
+        self.request = None
+
     def __getstate__(self):
         # Consume everything; accessing the content attribute makes
         # sure the content has been fully read.