Replace calls to deprecated HttpComponentsClientHttpRequestFactory#setConnectionTimeout method
Closed this issue · 4 comments
As seen in spring-projects/spring-framework#35748, the HttpComponentsClientHttpRequestFactory#setConnectionTimeout method has been deprecated because we cannot use HttpClientConfig's deprecated method anymore as it causes issues.
We need to consider what to do in Spring Boot as ClientHttpRequestFactorySettings and related properties are supporting this.
Note that Oleg Kainichevski offered to help, if needed.
Quote from https://issues.apache.org/jira/browse/HTTPCLIENT-2405 :
If they need our (my) help figuring out how to replace the deprecated APIs please do let me know.
@HenrikPublic thanks, but we know already how the new API should be used. It's just that this configuration is set on the client builder and is immutable once the client is build. It is incompatible with the client request factory approach where the client is given to the factory at instantiation time.
I think we can take care of this with some updates to HttpComponentsHttpClientBuilder. Interestingly, HttpComponentsHttpAsyncClientBuilder already applies the connect timeout at the HttpClient level and I think the imperative variant needs to do similar.
Thanks.