Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Save the last request to the wrapper instance

  • Loading branch information...
commit 736276662ab7aa401a496e46a17b21eed79f3c92 1 parent 973cc8b
Zach Williams authored March 05, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  three/three.py
6  three/three.py
@@ -75,7 +75,8 @@ def get(self, *args, **kwargs):
75 75
         else:
76 76
             conversion = True
77 77
         url = self._create_path(*args)
78  
-        content = requests.get(url, params=kwargs).content
  78
+        self.request = requests.get(url, params=kwargs)
  79
+        content = self.request.content
79 80
         return self.convert(content, conversion)
80 81
 
81 82
     def convert(self, content, conversion):
@@ -161,7 +162,8 @@ def post(self, code, **kwargs):
161 162
             kwargs['api_key'] = self.api_key
162 163
         kwargs['service_code'] = code
163 164
         url = self._create_path('requests')
164  
-        data = requests.post(url, data=kwargs).content
  165
+        self.request = requests.post(url, data=kwargs)
  166
+        data = self.request.content
165 167
         return data
166 168
 
167 169
     def token(self, id, **kwargs):

0 notes on commit 7362766

Please sign in to comment.
Something went wrong with that request. Please try again.