You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "wangdiao (JIRA)" <ji...@apache.org> on 2013/08/29 01:55:51 UTC

[jira] [Created] (HTTPASYNC-52) CloseableHttpAsyncClient cannot accept the proxy in RequestConfig

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