from link we understand that automatic content decompression.
is not supported.
So is below recipe good way to handle the gzip content ?
httpclient.execute(this.post, new FutureCallback<SimpleHttpResponse>() {
@Override
public void completed(SimpleHttpResponse response) {
String resXML = null;
Header contentEncoding = response.getHeader("Content-Encoding");
if(contentEncoding != null
&& "gzip".equalsIgnoreCase(contentEncoding.getValue())){
HttpEntity entity = new GzipDecompressingEntity(new ByteArrayEntity(response.getBodyBytes(), ContentType.APPLICATION_XML));
resXML = EntityUtils.toString(entity, "UTF-8");
}else{
resXML = response.getBodyText();
}
}