Code example for DefaultHttpRequestRetryHandler

0
			httpClient.addRequestInterceptor(new GzipRequestInterceptor());
			httpClient.addResponseInterceptor(new GzipResponseInterceptor());
		} 
		if (config.getHttpRetryCount() > 0) {
			HttpRequestRetryHandler retryHandler =
				new DefaultHttpRequestRetryHandler(config.getHttpRetryCount(), true);
			httpClient.setHttpRequestRetryHandler(retryHandler);
		} 
 
		return httpClient;
	} 
 
	private static void updateProxySetting(HttpConfig config, DefaultHttpClient httpClient) {
		if (config == null || httpClient == null){
			return; 
		} 
 
		HttpHost[] proxyChain = null;
 
		if (globalProxy != null) {
			//全局代理设置