This repository was archived by the owner on Dec 27, 2025. It is now read-only.
Description Summary
Add compression support to the HTTP client for both request and response handling.
Background
Currently, compression is handled entirely by fetch/browser automatically. This limits:
Explicit control over Accept-Encoding header
Ability to test compressed response handling
Potential for request body compression
Proposed API
interface HttpClientConfig {
// ...existing options
/**
* Compression configuration.
*/
readonly compression ?: {
/**
* Accept-Encoding values to send.
* @default ["gzip", "deflate", "br"]
*/
readonly acceptEncoding ?: string [ ] ;
/**
* Whether to automatically decompress responses.
* @default true
*/
readonly decompress ?: boolean ;
} ;
}
Test Coverage
Once implemented, integration tests can use echo-http service endpoints:
GET /gzip - Return gzip-compressed response
GET /deflate - Return deflate-compressed response
GET /brotli - Return brotli-compressed response
Labels
enhancement, client-http
Reactions are currently unavailable
Summary
Add compression support to the HTTP client for both request and response handling.
Background
Currently, compression is handled entirely by fetch/browser automatically. This limits:
Accept-EncodingheaderProposed API
Test Coverage
Once implemented, integration tests can use
echo-httpservice endpoints:GET /gzip- Return gzip-compressed responseGET /deflate- Return deflate-compressed responseGET /brotli- Return brotli-compressed responseLabels
enhancement, client-http