lastlegion / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Patch: gzip compression for GET responses. #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is a patch that allows responses to be gzip-compressed. It only works
on GET requests but with a little work it could be extended to POSTs too.

Gzip encoding is enabled by default in the request, but will only be
applied if the response contains a 'content-encoding' header.

You'll get crazy bandwidth savings using this. As an example a user's
timeline request went from ~9000 bytes to ~1000 bytes.

Cheers,
Luke Venediger 

Original issue reported on code.google.com by lukev...@gmail.com on 10 Apr 2009 at 1:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dclinton on 26 Apr 2009 at 5:55

GoogleCodeExporter commented 9 years ago
Patch applied in changeset 

http://code.google.com/p/python-twitter/source/detail?r=71a82d45e9687e11720237eb
9d932165d9fdcf15

I tweaked the default to False because I thought it would be a huge change to 
current code and made a change 
to the twitter.API() init parameter list to allow it to be overridden

Original comment by bear42 on 17 May 2010 at 5:41