| Modifier and Type | Class and Description |
|---|---|
| public static interface | ServerWebExchange.
Builder for mutating an existing |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | LOG_ID_ATTRIBUTE
Name of |
| Modifier and Type | Method and Description |
|---|---|
| public void | addUrlTransformer(Function<String, String>
a URL transformation function to add transformer)Register an additional URL transformation function for use with |
| public boolean | Returns: whether the request qualifies as not modifiedthe last-modified time lastModified)An overloaded variant of |
| public boolean | Returns: true if the request does not require further processing.the entity tag for the underlying resource. etag)An overloaded variant of |
| public boolean | Returns: true if the request does not require further processing.the entity tag that the application determined for the
underlying resource. This parameter will be padded with quotes (")
if necessary. etag, Instant the last-modified timestamp that the application
determined for the underlying resource lastModified)Check whether the requested resource has been modified given the supplied
|
| public default Mono | |
| public ApplicationContext | getApplicationContext()
Return the |
| public default < the attribute type T> T | Returns: the attribute valuethe attribute name name)Return the request attribute value if present. |
| public default < the attribute type T> T | Returns: the attribute valuethe attribute name name, T a default value to return instead defaultValue)Return the request attribute value, or a default, fallback value. |
| public Map | |
| public Mono | getFormData()
Return the form data from the body of the request if the Content-Type is
|
| public LocaleContext | getLocaleContext()
Return the |
| public String | Returns: the log message prefix or an empty String if theLOG_ID_ATTRIBUTE is not set.Return a log message prefix to use to correlate messages for this exchange. |
| public Mono | getMultipartData()
Return the parts of a multipart request if the Content-Type is
|
| public <T extends Principal> Mono | |
| public ServerHttpRequest | |
| public default < the attribute type T> T | Returns: the attribute valuethe attribute name name)Return the request attribute value or if not present raise an
|
| public ServerHttpResponse | |
| public Mono | |
| public boolean | isNotModified()
Returns |
| public default ServerWebExchange. | mutate()
Return a builder to mutate properties of this exchange by wrapping it
with |
| public String | Returns: the transformed URLthe URL to transform url)Transform the given url according to the registered transformation function(s). |
| LOG_ID_ATTRIBUTE | back to summary |
|---|---|
| public static final String LOG_ID_ATTRIBUTE Name of
| |
| addUrlTransformer | back to summary |
|---|---|
| public void addUrlTransformer(Function<String, String> transformer) Register an additional URL transformation function for use with Note that the given function is applied after any previously registered functions. | |
| checkNotModified | back to summary |
|---|---|
| public boolean checkNotModified(Instant lastModified) An overloaded variant of
| |
| checkNotModified | back to summary |
|---|---|
| public boolean checkNotModified(String etag) An overloaded variant of
| |
| checkNotModified | back to summary |
|---|---|
| public boolean checkNotModified(String etag, Instant lastModified) Check whether the requested resource has been modified given the supplied
Note The HTTP specification recommends setting both
ETag and Last-Modified values, but you can also use
| |
| cleanupMultipart | back to summary |
|---|---|
| public default Mono Cleans up any storage used for multipart handling.
| |
| getApplicationContext | back to summary |
|---|---|
| public ApplicationContext getApplicationContext() Return the
| |
| getAttribute | back to summary |
|---|---|
| public default <T> T getAttribute(String name) Return the request attribute value if present.
| |
| getAttributeOrDefault | back to summary |
|---|---|
| public default <T> T getAttributeOrDefault(String name, T defaultValue) Return the request attribute value, or a default, fallback value.
| |
| getAttributes | back to summary |
|---|---|
| public Map Return a mutable map of request attributes for the current exchange. | |
| getFormData | back to summary |
|---|---|
| public Mono Return the form data from the body of the request if the Content-Type is
Note calling this method causes the request body to
be read and parsed in full and the resulting | |
| getLocaleContext | back to summary |
|---|---|
| public LocaleContext getLocaleContext() Return the | |
| getLogPrefix | back to summary |
|---|---|
| public String getLogPrefix() Return a log message prefix to use to correlate messages for this exchange.
The prefix is based on the value of the attribute
| |
| getMultipartData | back to summary |
|---|---|
| public Mono Return the parts of a multipart request if the Content-Type is
Note calling this method causes the request body to
be read and parsed in full and the resulting Note the contents of each part is not cached, and can only be read once. | |
| getPrincipal | back to summary |
|---|---|
| public <T extends Principal> Mono Return the authenticated user for the request, if any. | |
| getRequest | back to summary |
|---|---|
| public ServerHttpRequest getRequest() Return the current HTTP request. | |
| getRequiredAttribute | back to summary |
|---|---|
| public default <T> T getRequiredAttribute(String name) Return the request attribute value or if not present raise an
| |
| getResponse | back to summary |
|---|---|
| public ServerHttpResponse getResponse() Return the current HTTP response. | |
| getSession | back to summary |
|---|---|
| public Mono Return the web session for the current request. Always guaranteed to
return an instance either matching to the session id requested by the
client, or with a new session id either because the client did not
specify one or because the underlying session had expired. Use of this
method does not automatically create a session. See | |
| isNotModified | back to summary |
|---|---|
| public boolean isNotModified() Returns | |
| mutate | back to summary |
|---|---|
| public default ServerWebExchange. Return a builder to mutate properties of this exchange by wrapping it
with | |
| transformUrl | back to summary |
|---|---|
| public String transformUrl(String url) Transform the given url according to the registered transformation function(s).
By default, this method returns the given | |
ServerWebExchange.
Removes the need
| Modifier and Type | Method and Description |
|---|---|
| public ServerWebExchange | |
| public ServerWebExchange. | |
| public ServerWebExchange. | request(Consumer<ServerHttpRequest.
Configure a consumer to modify the current request using a builder. |
| public ServerWebExchange. | request(ServerHttpRequest request)
Set the request to use especially when there is a need to override
|
| public ServerWebExchange. |
| build | back to summary |
|---|---|
| public ServerWebExchange build() Build a | |
| principal | back to summary |
|---|---|
| public ServerWebExchange. Set the | |
| request | back to summary |
|---|---|
| public ServerWebExchange. Configure 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);
| |
| request | back to summary |
|---|---|
| public ServerWebExchange. Set the request to use especially when there is a need to override
| |
| response | back to summary |
|---|---|
| public ServerWebExchange. Set the response to use. | |