0
我用httpasyncclient代理這樣的:爲什麼代理不使用上httpasyncclient
final CloseableHttpAsyncClient httpclient = HttpAsyncClients
.createDefault();
httpclient.start();
final HttpGet request = new HttpGet("http://www.apache.org/");
HttpHost proxy = new HttpHost("127.0.0.1", 8888, "http");
RequestConfig config = RequestConfig.custom().setProxy(proxy).build();
request.setConfig(config);
final Future<HttpResponse> future = httpclient.execute(request, null);
System.out.println("Response: " + future.get().getStatusLine());
但請求獲取數據不通過代理。爲什麼? 版本: httpasyncclient 4.0-beta4