Add code to show that Gzip worked
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@722043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d06ecc08e7
commit
b2902f1ca0
|
@ -108,6 +108,8 @@ public class ClientGZipContentCompression {
|
|||
|
||||
System.out.println("----------------------------------------");
|
||||
System.out.println(response.getStatusLine());
|
||||
System.out.println(response.getLastHeader("Content-Encoding"));
|
||||
System.out.println(response.getLastHeader("Content-Length"));
|
||||
System.out.println("----------------------------------------");
|
||||
|
||||
HttpEntity entity = response.getEntity();
|
||||
|
@ -115,6 +117,8 @@ public class ClientGZipContentCompression {
|
|||
if (entity != null) {
|
||||
String content = EntityUtils.toString(entity);
|
||||
System.out.println(content);
|
||||
System.out.println("----------------------------------------");
|
||||
System.out.println("Uncompressed size: "+content.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue