RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v4]
Andrey Turbanov
aturbanov at openjdk.org
Sat Mar 16 22:18:29 UTC 2024
On Tue, 12 Mar 2024 21:41:42 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Hi,
>>
>> This PR proposes to add simple utility method which returns a simple GET HttpRequest in one call. The current builder pattern requires 4 (or 3 since GET is the default method) method calls to achieve the same effect.
>>
>> Thanks,
>> Michael
>
> Michael McMahon has updated the pull request incrementally with one additional commit since the last revision:
>
> Update src/java.net.http/share/classes/java/net/http/HttpRequest.java
>
> Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
test/jdk/java/net/httpclient/GETTest.java line 70:
> 68: SSLContext sslContext = secure ? new SimpleSSLContext().get() : null;
> 69: HttpTestServer server = HttpTestServer.create(version, sslContext, e);
> 70: HttpTestContext serverContext = server.addHandler(h,"/test/");
Suggestion:
HttpTestContext serverContext = server.addHandler(h, "/test/");
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18227#discussion_r1527166577
More information about the net-dev
mailing list