Suggestion for the HTTP client: allow selection of a local address
Michael McMahon
michael.x.mcmahon at oracle.com
Wed Aug 8 15:46:04 UTC 2018
Klaus
I've created an RFE at https://bugs.openjdk.java.net/browse/JDK-8209137
to track this. I imagine the simplest solution would be to be able to
specify the local
address when constructing a HttpClient, and then all connections created
using that
client would be bound to the chosen address.
Michael.
On 08/08/2018, 15:43, Klaus Malorny wrote:
>
>
> Hi,
>
> I just discussed with a colleague that we dreadfully miss the ability
> in the old HttpURLConnection to set the address to which the client
> locally binds, which we require to get through the firewalls of our
> business partners when connecting from a multihomed system. This
> repeatedly caused us to use third-party libraries, which are powerful
> on the one hand, but cumbersome on the other.
>
> With the new HTTP2 client in mind, I wanted to tell him, wait, with
> Java 9+, it will be better. But I checked first and discovered that
> there is still no way to do so.
>
> So, when you eventually revise the API, it would be nice if you could
> consider the addition of such a feature.
>
> Regards,
>
> Klaus
>
More information about the net-dev
mailing list