hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wangdiao (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPASYNC-52) CloseableHttpAsyncClient cannot accept the proxy in RequestConfig
Date Wed, 28 Aug 2013 23:55:51 GMT
wangdiao created HTTPASYNC-52:
---------------------------------

             Summary: CloseableHttpAsyncClient cannot accept the proxy in RequestConfig
                 Key: HTTPASYNC-52
                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-52
             Project: HttpComponents HttpAsyncClient
          Issue Type: Bug
    Affects Versions: 4.0-beta4
         Environment: jdk7
            Reporter: wangdiao


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, localcontext, null);
Cannot request data via proxy, I must use:
final HttpClientContext localcontext = HttpClientContext.adapt(new BasicHttpContext());
localcontext.setRequestConfig(config);
final Future<HttpResponse> future = httpclient.execute(request, localcontext, null);
I think it is needed to fix it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message