本文整理汇总了Java中org.apache.http.impl.client.DecompressingHttpClient类的典型用法代码示例。如果您正苦于以下问题:Java DecompressingHttpClient类的具体用法?Java DecompressingHttpClient怎么用?Java DecompressingHttpClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DecompressingHttpClient类属于org.apache.http.impl.client包,在下文中一共展示了DecompressingHttpClient类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.apache.http.impl.client.DecompressingHttpClient; //导入依赖的package包/类
public void setup() {
DefaultHttpClient defaultClient = new DefaultHttpClient(new PoolingClientConnectionManager(schemeRegistry), params);
auth.setupConnection(defaultClient);
if (enableGZip) {
underlying.set(new DecompressingHttpClient(defaultClient));
} else {
underlying.set(defaultClient);
}
}
示例2: httpClient
import org.apache.http.impl.client.DecompressingHttpClient; //导入依赖的package包/类
@Bean
public HttpClient httpClient()
{
DefaultHttpClient defaultHttpClient = new DefaultHttpClient(connectionManager());
HttpParams httpParams = defaultHttpClient.getParams();
HttpConnectionParams.setConnectionTimeout(httpParams, 2000);
HttpConnectionParams.setSoTimeout(httpParams, 30000);
return new DecompressingHttpClient(defaultHttpClient);
}
示例3: ShellHttpClient
import org.apache.http.impl.client.DecompressingHttpClient; //导入依赖的package包/类
ShellHttpClient() {
this.httpClient = new DecompressingHttpClient(new DefaultHttpClient());
}