egg-mode icon indicating copy to clipboard operation
egg-mode copied to clipboard

Add `Accept-Encoding` when making API requests

Open tesaguri opened this issue 4 years ago • 1 comments

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 avatar Jul 14 '21 11:07 tesaguri

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.

tesaguri avatar Jun 27 '22 10:06 tesaguri