1

When creating a normal CloseableHttpClient I can disable compression (and redirections) by doing

httpclient = HttpClients.custom()
            .disableRedirectHandling()
            .disableContentCompression()
            .build();

This way I receive gzip data unaltered. Now I'm trying the same with CloseableHttpAsyncClient, but the relevant methods are missing from HttpAsyncClients.custom():

asyncHttpClient = HttpAsyncClients.custom()
    .disableContentCompression() // COMPILE ERROR
    .build();

I'm just at the start of evaluating the feasability or rewriting my code to the async API so I might be missing something. How is the async client going to handle compressed content? Can its behavior be customized?

xtian
  • 2,908
  • 2
  • 30
  • 43

1 Answers1

4

HttpAsyncClient 4.x currently does not support automatic content decompression.

ok2c
  • 26,450
  • 5
  • 63
  • 71