SIGN IN SIGN UP
Homebrew / brew UNCLAIMED

🍺 The missing package manager for macOS (or Linux)

0 0 185 Ruby

brew-rs: enable compression in reqwest

This adds `gzip` and `deflate` features from the `reqwest` crate and
enables compression in the `build_client` function. There are also
`brotli` and `zstd` features but I've used the compression methods
that we're already using in `curl`. `gzip` is the best we can get from
the servers that we're currently using, so there isn't any benefit to
the other compression methods for now.

For what it's worth, `reqwest` takes care of automatically adding the
`Accept-Encoding` header to requests and decompressing responses that
have a `Content-Encoding` header. In the process, it removes
`Content-Encoding` and `Content-Length` headers from the response, so
it's a little tricky to tell if it's working but I manually verified
the behavior.
S
Sam Ford committed
d942d267adc0746e23e2af2327d515dd770e7cdd
Parent: 86fe878