hc-dev mailing list archives

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

     [ https://issues.apache.org/jira/browse/HTTPASYNC-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

wangdiao updated HTTPASYNC-52:
------------------------------

    Description: 
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);
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.

  was:
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.

    
> 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
>            Priority: Minor
>
> 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);
> 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