Package org.springframework.web.server
Interface ServerWebExchange.Builder
- Enclosing interface:
- ServerWebExchange
public static interface ServerWebExchange.Builder
Builder for mutating an existing 
ServerWebExchange.
 Removes the need- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build aServerWebExchangedecorator with the mutated properties.Set theMono<Principal>to return for this exchange.request(Consumer<ServerHttpRequest.Builder> requestBuilderConsumer) Configure a consumer to modify the current request using a builder.request(ServerHttpRequest request) Set the request to use especially when there is a need to overrideServerHttpRequestmethods.response(ServerHttpResponse response) Set the response to use.
- 
Method Details- 
requestConfigure a consumer to modify the current request using a builder.Effectively this: exchange.mutate().request(builder -> builder.method(HttpMethod.PUT)); // vs... ServerHttpRequest request = exchange.getRequest().mutate() .method(HttpMethod.PUT) .build(); exchange.mutate().request(request);- See Also:
 
- 
requestSet the request to use especially when there is a need to overrideServerHttpRequestmethods. To simply mutate request properties seerequest(Consumer)instead.- See Also:
 
- 
responseSet the response to use.- See Also:
 
- 
principalSet theMono<Principal>to return for this exchange.
- 
buildServerWebExchange build()Build aServerWebExchangedecorator with the mutated properties.
 
-