Closed
Description
Current implementation that builds HTTP client request is:
builder.method(this.method.name(), bodyPublisher(headers, body));
This results in creating a GET
request without a body.
This however isn't internally the same as not setting publisher at all (openjdk/jdk@6a77093).
Unfortunately you must always pass the published for this method. While you could file a bug against JDK, getting a fix will take far longer than addressing this in Spring.
I believe what is required is to change Spring's algorithm to something that checks if there is a body and if the request method is one of GET
, DELETE
, or HEAD
. If it is, then one should call matching method in the request builder.