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

Gzip outgoing request body (POST|PATCH|PUT)? #2397

Closed
kjs3 opened this issue Sep 28, 2016 · 4 comments
Closed

Gzip outgoing request body (POST|PATCH|PUT)? #2397

kjs3 opened this issue Sep 28, 2016 · 4 comments
Labels

Comments

@kjs3
Copy link

kjs3 commented Sep 28, 2016

This issue shows how to compress request bodies but I'm wondering why that wouldn't be done automatically with the {gzip: true} option?

Is this just a technical issue that hasn't been implemented yet?

@tzachshabtay
Copy link

Joining this question. I think the "gzip" option relates to the response compression, not to the request compression. It sounds to me like there should be 2 options: "gzip_response" and "gzip_request".

There's an issue from 2012 (#234) which was closed, the comments implying that this is now supported? But it's not, right? This left me confused.

@kjs3
Copy link
Author

kjs3 commented Jul 19, 2017

@tzachshabtay: Yes, this confused me too.

You are correct. The gzip option only refers to decompressing the response. I had to manually gzip the outgoing POST body.

I'm not sure this module should implement outgoing compression though. I don't believe servers are typically setup to inflate/decompress incoming request bodies. I controlled the server side in my case so I manually decompressed on that end. Saving some bandwidth seemed worth it but it was definitely a custom thing.

If I'm wrong and request body compression is expected on the server then I would think this should be implemented.

@tzachshabtay
Copy link

What server software are you using? Using NodeJS + Express, and it seems that the server automatically decompressed my manual gzip compressed json body (had to put Content-Encoding=gzip on the request).

@stale
Copy link

stale bot commented Nov 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 23, 2018
@stale stale bot closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants