-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Rob Winch opened SPR-16553 and commented
When working with an ExchangeFilterFunction
it expects that a Mono<ClientResponse>
is provided as a return type. Similar to ClientRequest.Builder
for ClientRequest
, it would be nice if there were a simple way to create a ClientResponse
. This would make it easier to use the ExchangeFilterFunction
API to provide custom ClientResponse
. For example, consider an ExchangeFilterFunction
that provides a default value on an error:
ClientResponse fallbackResponse = null; // no builder for this
ExchangeFilterFunction fallback = (r,n) -> n
.exchange(r)
.onErrorResume(Exception.class, e -> Mono.just(fallbackResponse));
A few use cases that would be valuable to support are:
- Creating a
ClientResponse
from aWebClient.ResponseSpec
- Creating a
ClientResponse
from an existingClientResponse
Affects: 5.0.4
Issue Links:
- Provide simple way to create ServerRequest [SPR-16706] #21247 Provide simple way to create ServerRequest
Referenced from: commits 04c2a29
0 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement