Skip to content

Document non trivial WebClient configurations [SPR-15778] #20333

Closed
@spring-projects-issues

Description

@spring-projects-issues

Abhijit Sarkar opened SPR-15778 and commented

I'm looking to migrate to WebClient from Apache HttpClient that currently has the following configurations. I could not find any of these using the WebClient.

  1. Custom javax.net.ssl.SSLContext: I'm accepting all certificates but logging when a certificate fails validation; details in this SO thread.
  2. Socket and connection timeouts
  3. Retrieving the redirect URLs, if any: HttpClient remembers all the redirect URLs.
  4. Caching (Apache has a CachingHttpClients): I'm not very concerned if this feature is not built in the WebClient because I can use Spring cache abstraction. I'd just like to know whether the client has first-class support for caching or not.

In general, when using RestTemplate, there's a whole bunch of ClientHttpRequestFactory implementations to choose from, or customize upon. How do I achieve such flexibility with WebClient so that if I want to switch out the underlying HTTP client, I can?


Affects: 5.0 RC2

Referenced from: commits f9e1913

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions