Response.read() [file like object]
authorKenneth Reitz <me@kennethreitz.com>
Thu, 31 Mar 2011 08:47:02 +0000 (04:47 -0400)
committerKenneth Reitz <me@kennethreitz.com>
Thu, 31 Mar 2011 08:47:02 +0000 (04:47 -0400)
requests/core.py

index ca5e5ef..aae09b3 100644 (file)
@@ -217,7 +217,7 @@ class Request(object):
 
 
     def read(self):
-        return self.content
+        return self.response.read()
     
 class Response(object):
     """The :class:`Request` object. All :class:`Request` objects contain a
@@ -249,6 +249,8 @@ class Response(object):
         if self.error:
             raise self.error
 
+    def read(self):
+        return self.content
 
 
 class AuthManager(object):