Update `ClientHttpRequestFactoryBuilder` implementations for
`HttpComponents`, `Jdk`, `Jetty` and `Reactor` to allow customization
of the underlying components.
Closes gh-39035
Update `ClientHttpRequestFactoryBuilder` implementations to ensure
that all libraries have consistent redirect follow behavior. Following
of redirects is enabled by default.
The `ClientHttpRequestFactorySettings` may be used to change if
redirects should be followed. The `spring.http.client.redirects`
property may also be used to update the default behavior.
Closes gh-42879
Add a new `HttpClientAutoConfiguration` class that provides
`ClientHttpRequestFactoryBuilder` and `ClientHttpRequestFactorySettings`
beans and new configuration properties.
The existing `RestTemplate`, `RestClient` and `WebServiceTemplate`
auto-configurations have been updated to make use of the new
HTTP client support.
Users may now set `spring.http.client` property to globally change
the `ClientHttpRequestFactory` used in their application.
Closes gh-36266
Add a new `WebServiceMessageSenderFactory` factory interface to replace
`HttpWebServiceMessageSenderBuilder`. The factory provides a general
purpose way of creating `WebServiceMessageSender` instances, but most
typically will be `ClientHttpRequestMessageSender` created from a
`ClientHttpRequestFactoryBuilder`.
A new `httpMessageSenderFactory` method has been added to the
`WebServiceTemplateBuilder` class. This allows any sender to be
plugged into the template.
Closes gh-42886
Add a `requestFactorySettings` method to `RestTemplateBuilder` to make
it easier to apply an existing `ClientHttpRequestFactorySettings`
instance.
Closes gh-42885
Refactor the internals of `RestTemplateBuilder` so that the new
`ClientHttpRequestFactoryBuilder` is used to create
`ClientHttpRequestFactory` instance.
See gh-36266
Add a new `ClientHttpRequestFactoryBuilder` interface to support the
creation of `ClientHttpRequestFactory` instances. The new code will
ultimately replace the existing `ClientHttpRequestFactories` class.
The `ClientHttpRequestFactoryBuilder` is a functional interface with
additional static factory methods for the various supported
`ClientHttpRequestFactory` types. Each type has it's own builder
which should allow us to support additional customization in the future.
Unlike `ClientHttpRequestFactories`, the builder aligns with Spring
Framework defaults and will detect the `JdkClientHttpRequestFactory`
in preference of `SimpleClientHttpRequestFactory`.
This commit also relocates `ClientHttpRequestFactorySettings` to bring
it into the new `http.client` package.
See gh-36266