o.s.http.client.SimpleClientHttpRequestFactory does not allow to specify a java.net.Proxy [SPR-7305] #11964
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Cédrik LIME opened SPR-7305 and commented
While working with the new ClientHttpRequestFactory, I need to create an outgoing HTTP connection via a proxy.
ClientHttpRequestFactory has 2 implementations: commons-http and simple (Java native).
While I can specify a proxy using CommonsClientHttpRequestFactory (it exposes the HttpClient instance), this is not true of SimpleClientHttpRequestFactory.
To fix this problem, you need to externalise the 1st line of SimpleClientHttpRequestFactory#createRequest(URI, HttpMethod) so that we can subclass uri.toURL().openConnection() to read uri.toURL().openConnection(someProxy) when needed.
Affects: 3.0.3
Referenced from: commits c059f53
The text was updated successfully, but these errors were encountered: