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

HTTP client to support body decompression #473

Open
wants to merge 9 commits into
base: master
from

Conversation

@kachayev
Copy link
Collaborator

kachayev commented Jan 31, 2019

Covers #444, differences from clj-http API:

  1. :decompress-body? is set for the connection, not for the request

  2. :decompress-body? defaults to false when clj-http sets it to true. I will probably prefer the latest, but it would be a breaking change

  3. HttpContentDecompressor removes "Content-Encoding" header when done. A simple way to get the information of the origin content encoding (:orig-content-encoding with clj-http) is to introduce another pipeline handler that copies the value to another header "X-Origin-Content-Encoding". I don't see any use cases except debug (well, it's used in tests too). So I introduced another option to switch this ON and not waste resources when the user doesn't need it: :save-content-encoding?.

  4. It also automatically includes "Accept-Encoding" header as "gzip, deflate" if not set by the user manually.

@ztellman ztellman added the approved label May 14, 2019
@ztellman

This comment has been minimized.

Copy link
Owner

ztellman commented May 14, 2019

Approved for merging, pending fixing the conflicts.

@kachayev

This comment has been minimized.

Copy link
Collaborator Author

kachayev commented May 19, 2019

@ztellman Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.