Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for gzip and deflate compression #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mvdwalle
Copy link

@mvdwalle mvdwalle commented May 9, 2016

Twitter can support gzip compression. I added the option gzip: true to the request and added code to handle either gzip, deflate or none.

I took a quick look at how the tests were set up and I could create tests for this if wanted. But I wanted someone to review first.

@nathanbowser
Copy link
Member

This seems reasonable to me. Have you been using this branch in your own work?

I'd like to see an opt-in approach to this, though.

e.g.

new Twitter({
    consumer_key: '',
    consumer_secret: '',
    token: '',
    token_secret: ''
  }, {
   gzip: true // defaults to false to prevent any potential breakage. 
  })

@mvdwalle
Copy link
Author

I chanegd the pull request as suggested. This change is one of a few that we are or want to use internally at my company.

@nathanbowser
Copy link
Member

Awesome, thanks! I'd say once you write some tests, we can get this merged.

@fourpixels
Copy link

Any news? Is this still supported?

@nathanbowser
Copy link
Member

Module is supported. Waiting on tests for this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants