On Thu, 11 Nov 2021 12:05:49 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

> Can I please get a review for this change which  implements the enhancement 
> noted in https://bugs.openjdk.java.net/browse/JDK-8276559?
> 
> The commit in this PR introduces a new `HEAD()` method on the 
> `HttpRequest.Builder` interface. Given that this is a public interface on a 
> public class of a public module, I decided to add this new method as a 
> `default` method to prevent any potential breakages of any non-JDK 
> implementations of this interface. The internal 
> `jdk.internal.net.http.HttpRequestBuilderImpl` which implements this 
> interface, overrides this default implementation to use an implementation of 
> its own.
> 
> Existing tests have been updated to include coverage for this new method.
> 
> P.S: Slightly unrelated question - is it intentional that the `Builder` 
> interface specifies the visibility modifiers on the interface methods. For 
> example:  `public abstract Builder timeout(Duration duration);`, `public 
> Builder headers(String... headers);` and so on?

This pull request has now been integrated.

Changeset: 23e5117a
Author:    Jaikiran Pai <j...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/23e5117a55b3f3d0e3d26bf2d481f4ad1c99af57
Stats:     92 lines in 6 files changed: 48 ins; 34 del; 10 mod

8276559: (httpclient) Consider adding an HttpRequest.Builder.HEAD method to 
build a HEAD request.

Reviewed-by: cstein, dfuchs

-------------

PR: https://git.openjdk.java.net/jdk/pull/6348

Reply via email to