As JDK17 is now the baseline it is possible to use the HttpClient provided by Java.

Comment From: poutsma

Thank for your submitting this PR, @mdeinum. I made several changes to the PR.

  • Removed duplicate Client in types names, to mirror the reactive versions in org.springframework.http.client.reactive.
  • Removed request buffering in favor of an OutputStream to Flow.Publisher<ByteBuffer> bridge, see OutputStreamPublisher. Thank you, @OlegDokuka!
  • Made request and response types package private, similar to other request and response types in the package.
  • Various other small improvements.

Comment From: alexcrownus

JdkClientHttpRequestFactory is not compatible with BufferingClientHttpRequestFactory #31027