Request: mechanism for making HttpRequest.Builder from HttpRequest

Chris Hegarty chris.hegarty at oracle.com
Thu Oct 15 16:36:51 UTC 2020


Hi Craig,

> On 15 Oct 2020, at 17:22, Craig Andrews <candrews at integralblue.com> wrote:
> 
> Java's HttpClient relies on the builder pattern to produce immutable objects on which actual operations are done. However, it currently lacks a way to convert those working objects back to builders in order to mutate them.

I agree that such an API point would be useful. I filed an issue and proposed API sketch a while back. I have strong hope that it will make it to a Java release real soon.

https://bugs.openjdk.java.net/browse/JDK-8252304 - "Seed an HttpRequest.Builder from an existing HttpRequest”.

-Chris.


More information about the net-dev mailing list