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);
}
}
java类org.apache.http.impl.client.DecompressingHttpClient的实例源码
RestartableHttpClient.java 文件源码
项目:hbc
阅读 17
收藏 0
点赞 0
评论 0
WebAppConfig.java 文件源码
项目:molgenis-lifelines
阅读 23
收藏 0
点赞 0
评论 0
@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);
}
ShellHttpClient.java 文件源码
项目:elasticshell
阅读 15
收藏 0
点赞 0
评论 0
ShellHttpClient() {
this.httpClient = new DecompressingHttpClient(new DefaultHttpClient());
}