I think you want to use DecompressingHttpClient (or the new HttpClientBuilder - which adds that header by default, don't call disableContentCompression - I don't think
DefaultHttpClient
supports compression by default). The client needs to send an Accept-Encoding header, Content-Encoding comes from the server response.Read full article from A bit confused about HttpClient[Java] handling gzip responses - Stack Overflow
No comments:
Post a Comment