[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17136414#comment-17136414
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-2087:
-----------------------------------------------

{code:java}

CloseableHttpClient httpClient = HttpClientBuilder.create()
 .setRoutePlanner(new DefaultRoutePlanner(DefaultSchemePortResolver.INSTANCE) {

 @Override
 protected InetAddress determineLocalAddress(
 HttpHost firstHop,
 HttpContext context) throws HttpException {
 return null;
 }

 })
 .build();
{code}

Please do _not_ reopen the ticket unless it is a reproducible bug.

Oleg 

> What is the alternative to RequestConfig.Builder setLocalAddress in version 
> 5.0?
> --------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2087
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2087
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 5.0
>            Reporter: fanglikui
>            Priority: Major
>
> In HttpClient 4.5.X version, I can use the method setLocalAddress in 
> RequestConfig.Builder to specify outgoing ip address.  But in version 5.0, 
> the method was deleted. If I want to specify the outgoing ipaddress, which 
> method can I use?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to