Github user ok2c commented on the issue:
https://github.com/apache/httpclient/pull/75
@pmouawad I am not sure it is a good idea to introduce a hard dependency on
an external library for a single decompression codec, especially given it is
quite easy to plug it in with HttpClientBuilder. If the brotli codec were
supported by Commons Codec it would be easier to add it to the default
configuration.
```
LinkedHashMap<String, InputStreamFactory> contentDecoderMap = new
LinkedHashMap<>();
contentDecoderMap.put("gzip", new InputStreamFactory() {
@Override
public InputStream create(final InputStream instream) throws
IOException {
return new GZIPInputStream(instream);
}
});
contentDecoderMap.put("br", new InputStreamFactory() {
@Override
public InputStream create(final InputStream instream) throws
IOException {
return new BrotliInputStream(instream);
}
});
CloseableHttpClient httpclient = HttpClients.custom()
.setContentDecoderRegistry(contentDecoderMap)
.build();
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]