Affects: spring-webflux

Please consider moving creation ClientRequest during creating exchange() of Webclients inside Mono.defer() operator: Mono.defer( () -> exchangeFunction.exchange(createClientRequest())

to allow modify with not empty reactive context in webclientBuilder.defaultRequest(Consumer<RequestHeadersSpec<?>> defaultRequest) in real just before request style


Comment From: rstoyanchev

Invoking defaultRequest on the thread where the WebClient allows modifying the request based on Threadlocal context in the calling thread. We can't change that without breaking code that currently relies on that. That said we can update the Javadoc to specify this explicitly.

Have you considered modifying the request through a filter, i.e. an ExchangeFilterFunction?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.