[
https://issues.apache.org/jira/browse/HTTPCLIENT-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
zirong updated HTTPCLIENT-2225:
--------------------------------
Description:
The proxy host within DefaultRequestConfig will be ignored when creating
httpAsyncClient and sending request using the following code.
{code:java}
CloseableHttpAsyncClient client = HttpAsyncClients.custom()
.setConnectionManager(cm)
.setVersionPolicy(HttpVersionPolicy.NEGOTIATE)
.setDefaultRequestConfig(RequestConfig.custom().setProxy(proxy).build())
.build();
final SimpleHttpRequest request = SimpleRequestBuilder.get()
.setHttpHost(target)
.setPath("/")
.build();
final Future<SimpleHttpResponse> future = client.execute(
SimpleRequestProducer.create(request),
SimpleResponseConsumer.create(),
HttpClientContext.create(),
new FutureCallback<SimpleHttpResponse>() {...});{code}
was:
The proxy host within DefaultRequestConfig will be ignored when creating
httpAsyncClient using the following code.
{code:java}
CloseableHttpAsyncClient client = HttpAsyncClients.custom()
.setConnectionManager(cm)
.setVersionPolicy(HttpVersionPolicy.NEGOTIATE)
.setDefaultRequestConfig(RequestConfig.custom().setProxy(proxy).build())
.build();
final SimpleHttpRequest request = SimpleRequestBuilder.get()
.setHttpHost(target)
.setPath("/")
.build();
final Future<SimpleHttpResponse> future = client.execute(
SimpleRequestProducer.create(request),
SimpleResponseConsumer.create(),
HttpClientContext.create(),
new FutureCallback<SimpleHttpResponse>() {...});{code}
> The proxy in defaultRequestConfig of HttpAsyncClients not work
> --------------------------------------------------------------
>
> Key: HTTPCLIENT-2225
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2225
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (async)
> Affects Versions: 5.1.3
> Reporter: zirong
> Priority: Major
>
> The proxy host within DefaultRequestConfig will be ignored when creating
> httpAsyncClient and sending request using the following code.
> {code:java}
> CloseableHttpAsyncClient client = HttpAsyncClients.custom()
> .setConnectionManager(cm)
> .setVersionPolicy(HttpVersionPolicy.NEGOTIATE)
>
> .setDefaultRequestConfig(RequestConfig.custom().setProxy(proxy).build())
> .build();
> final SimpleHttpRequest request = SimpleRequestBuilder.get()
> .setHttpHost(target)
> .setPath("/")
> .build();
> final Future<SimpleHttpResponse> future = client.execute(
> SimpleRequestProducer.create(request),
> SimpleResponseConsumer.create(),
> HttpClientContext.create(),
> new FutureCallback<SimpleHttpResponse>() {...});{code}
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]