Expose HTTPResponse object as API.last_response
authorJosh Roesslein <jroesslein@gmail.com>
Thu, 24 Sep 2009 19:46:06 +0000 (14:46 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Thu, 24 Sep 2009 19:46:06 +0000 (14:46 -0500)
CHANGES
tweepy/binder.py

diff --git a/CHANGES b/CHANGES
index 9eb8de01750431fe9055cb47aabca70ccc17739d..f43a02aa47885f0102ed9a20488b8bc6bfed0638 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -13,6 +13,7 @@ during upgrade will be listed here.
     + Added new parameters for statuses/update; lat & long
     + friends_ids() & followers_ids() parameter changed page -> cursor
     + search() added "locale" parameter
+    + expose last httplib.HTTPResponse object received as API.last_response
 + OAuthHandler
     + Added set_request_token() method
     + Added support for "sign in with twitter".
index ef48d098c67c7d913ebe610794b0110b253fcca7..ac04ec3d03476fb3768ec8f346370ae734baab8e 100644 (file)
@@ -106,6 +106,7 @@ def bind_api(path, parser, allowed_param=None, method='GET', require_auth=False,
 
         # Get response
         resp = conn.getresponse()
+        api.last_response = resp
         api.logger.debug('Received response...')
         api.logger.debug('  headers: %s' % resp.getheaders())
         api.logger.debug('  status code: %s' % resp.status)