Refactor the way `ClientHttpRequestFactory` instances are created in order to support setting read timeouts. Prior to this commit, the reflection based approach would call `setReadTimeout`. As of Spring Framework 6.0, the `HttpComponentsClientHttpRequestFactory` class no longer supports this approach. The timeout must be set on the `HttpClientConnectionManager` used in the `HttpClient` which can be passed in to the constructor. In order to support this approach, the `ClientHttpRequestFactory` can now be created using a `Function` rather than a `Supplier`. The function accepts a `ClientHttpRequestFactorySettings` which provides the timeout settings to apply. The `ClientHttpRequestFactories` utility class provides methods to create `ClientHttpRequestFactory` instances that respect the settings. Whenever possible, these are created without using reflection. Fixes gh-32857 Co-authored-by: Phillip Webb <pwebb@vmware.com> |
||
---|---|---|
.. | ||
src | ||
build.gradle |