Skip to content

Add Accept-Encoding when making API requests#122

Open
tesaguri wants to merge 1 commit intoegg-mode-rs:masterfrom
tesaguri:gzip
Open

Add Accept-Encoding when making API requests#122
tesaguri wants to merge 1 commit intoegg-mode-rs:masterfrom
tesaguri:gzip

Conversation

@tesaguri
Copy link
Contributor

This uses tower-http crate's Decompression middleware, which adds Accept-Encodings to the requests and transparently decodes the response bodies. It should significantly reduce network traffic.

The REST API supports the efficient br encoding but the Streaming API v1 supports the gzip encoding only, so I enabled both the encodings.

@tesaguri
Copy link
Contributor Author

Upgraded tower-http to ^0.3.

The CI failure seems to be due to a dependency's MSRV bump and not to be related to this change.

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.

1 participant