mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
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 void process(
|
||||
|
||||
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 void process(
|
||||
if (entity != null) {
|
||||
String content = EntityUtils.toString(entity);
|
||||
System.out.println(content);
|
||||
System.out.println("----------------------------------------");
|
||||
System.out.println("Uncompressed size: "+content.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user