Closed as not planned
Closed as not planned
Description
Spring Framework documents that the default ClientHttpRequestFactory
used when building a RestClient
is the following, conditional on the classpath:
- Apache HTTP Client
- Jetty HTTP Client
- JDK HTTP Client
SimpleClientHttpRequestFactory
Spring Boot's RestClient
auto-configuration overrides the request factory using ClientHttpRequestFactories
, which has the following order:
- Apache HTTP Client
- Jetty HTTP Client
- OkHttp3 Client (deprecated)
SimpleClientHttpRequestFactory
The result is that the JDK HTTP client is not considered when Spring Boot auto-configures the RestClient
. We should consider bringing the Boot defaults in line with Framework.