ServerRequest implementation based on a ServerWebExchange.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Function | |
| private static final Function | |
| private final ServerWebExchange | |
| private final ServerRequest. | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Map | attributes()
Implements org. Get a mutable map of request attributes. |
| public <T> Mono | bind(Class<T>
the type of class to bind this request to bindType, Consumer<WebDataBinder> used to customize the data binder, e.g. set
(dis)allowed fields dataBinderCustomizer)Implements org. Bind to this request and return an instance of the given type. |
| public <T> T | body(BodyExtractor<T, ? super ServerHttpRequest>
the extractor)BodyExtractor that reads from the requestImplements org. Extract the body with the given |
| public <T> T | body(BodyExtractor<T, ? super ServerHttpRequest>
the extractor, Map<String, Object> BodyExtractor that reads from the requestthe map of hints like hints)Jackson2CodecSupport#JSON_VIEW_HINT
to use to customize body extractionImplements org. Extract the body with the given |
| private <T> T | |
| public <T> Flux | bodyToFlux(Class<? extends T>
the class of element in the elementClass)FluxImplements org. Extract the body to a |
| public <T> Flux | bodyToFlux(ParameterizedTypeReference<T>
a type reference describing the expected request body type typeReference)Implements org. Extract the body to a |
| public <T> Mono | bodyToMono(Class<? extends T>
the class of element in the elementClass)MonoImplements org. Extract the body to a |
| public <T> Mono | bodyToMono(ParameterizedTypeReference<T>
a type reference describing the expected response request type typeReference)Implements org. Extract the body to a |
| pack-priv static Mono | |
| public MultiValueMap | cookies()
Implements org. Get the cookies of this request. |
| public ServerWebExchange | exchange()
Implements org. Get the web exchange that this request is based on. |
| public Mono | formData()
Implements org. Get the form data from the body of the request if the Content-Type is
|
| public ServerRequest. | headers()
Implements org. Get the headers of this request. |
| public Optional | localAddress()
Implements org. Get the local address to which this request is connected, if available. |
| public List | messageReaders()
Implements org. Get the readers used to convert the body of this request. |
| public HttpMethod | method()
Implements org. Get the HTTP method. |
| public String | methodName()
Implements org.
Deprecated
Get the name of the HTTP method. |
| public Mono | multipartData()
Implements org. Get the parts of a multipart request if the Content-Type is
|
| public Map | pathVariables()
Implements org. Get all path variables for this request. |
| public Mono | principal()
Implements org. Get the authenticated user for the request, if any. |
| public MultiValueMap | queryParams()
Implements org. Get all query parameters for this request. |
| public Optional | remoteAddress()
Implements org. Get the remote address to which this request is connected, if available. |
| private ServerHttpRequest | |
| public RequestPath | requestPath()
Overrides default org. Get the request path as a |
| public Mono | session()
Implements org. Get the web session for this request. |
| public String | |
| public URI | uri()
Implements org. Get the request URI. |
| public UriBuilder | uriBuilder()
Implements org. Get a |
| DECODING_MAPPER | back to summary |
|---|---|
| private static final Function<DecodingException, ServerWebInputException> DECODING_MAPPER | |
| ERROR_MAPPER | back to summary |
|---|---|
| private static final Function<UnsupportedMediaTypeException, UnsupportedMediaTypeStatusException> ERROR_MAPPER | |
| exchange | back to summary |
|---|---|
| private final ServerWebExchange exchange | |
| headers | back to summary |
|---|---|
| private final ServerRequest. | |
| messageReaders | back to summary |
|---|---|
| private final List<HttpMessageReader<?>> messageReaders | |
| DefaultServerRequest | back to summary |
|---|---|
| pack-priv DefaultServerRequest(ServerWebExchange exchange, List<HttpMessageReader<?>> messageReaders) | |
| attributes | back to summary |
|---|---|
| public Map Implements org. Doc from org. Get a mutable map of request attributes. | |
| bind | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Bind to this request and return an instance of the given type.
| |
| body | back to summary |
|---|---|
| public <T> T body(BodyExtractor<T, ? super ServerHttpRequest> extractor) Implements org. Doc from org. Extract the body with the given
| |
| body | back to summary |
|---|---|
| public <T> T body(BodyExtractor<T, ? super ServerHttpRequest> extractor, Map<String, Object> hints) Implements org. Doc from org. Extract the body with the given
| |
| bodyInternal | back to summary |
|---|---|
| private <T> T bodyInternal(BodyExtractor<T, ? super ServerHttpRequest> extractor, Map<String, Object> hints) | |
| bodyToFlux | back to summary |
|---|---|
| public <T> Flux Implements org. Doc from org. Extract the body to a
| |
| bodyToFlux | back to summary |
|---|---|
| public <T> Flux Implements org. Doc from org. Extract the body to a
| |
| bodyToMono | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Extract the body to a | |
| bodyToMono | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Extract the body to a
| |
| checkNotModified | back to summary |
|---|---|
| pack-priv static Mono | |
| cookies | back to summary |
|---|---|
| public MultiValueMap Implements org. Doc from org. Get the cookies of this request.
| |
| exchange | back to summary |
|---|---|
| public ServerWebExchange exchange() Implements org. Doc from org. Get the web exchange that this request is based on. Note Manipulating the exchange directly (instead of using the methods provided on
| |
| formData | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Get 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
| |
| headers | back to summary |
|---|---|
| public ServerRequest. Implements org. Doc from org. Get the headers of this request.
| |
| localAddress | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the local address to which this request is connected, if available.
| |
| messageReaders | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the readers used to convert the body of this request.
| |
| method | back to summary |
|---|---|
| public HttpMethod method() Implements org. Doc from org. Get the HTTP method.
| |
| methodName | back to summary |
|---|---|
| public String methodName() Implements org. Doc from org. Deprecated
Get the name of the HTTP method.
| |
| multipartData | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Get 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
| |
| pathVariables | back to summary |
|---|---|
| public Map Implements org. Doc from org. Get all path variables for this request.
| |
| principal | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Get the authenticated user for the request, if any.
| |
| queryParams | back to summary |
|---|---|
| public MultiValueMap Implements org. Doc from org. Get all query parameters for this request.
| |
| remoteAddress | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the remote address to which this request is connected, if available.
| |
| request | back to summary |
|---|---|
| private ServerHttpRequest request() | |
| requestPath | back to summary |
|---|---|
| public RequestPath requestPath() Overrides default org. Doc from org. Get the request path as a
| |
| session | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Get the web session for this request. Always guaranteed to return an instance either matching 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| uri | back to summary |
|---|---|
| public URI uri() Implements org. Doc from org. Get the request URI.
| |
| uriBuilder | back to summary |
|---|---|
| public UriBuilder uriBuilder() Implements org. Doc from org. Get a Note as of 5.1 this method ignores
| |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeaders |
| Access | Constructor and Description |
|---|---|
| private |
| httpHeaders | back to summary |
|---|---|
| private final HttpHeaders httpHeaders | |
| DefaultHeaders | back to summary |
|---|---|
| private DefaultHeaders() | |
| accept | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the list of acceptable media types, as specified by the Returns an empty list if the acceptable media types are unspecified.
| |
| acceptCharset | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the list of acceptable charsets, as specified by the
| |
| acceptLanguage | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the list of acceptable languages, as specified by the
| |
| asHttpHeaders | back to summary |
|---|---|
| public HttpHeaders asHttpHeaders() Implements org. Doc from org. Get the headers as an instance of
| |
| contentLength | back to summary |
|---|---|
| public OptionalLong contentLength() Implements org. Doc from org. Get the length of the body in bytes, as specified by the
| |
| contentType | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Get the media type of the body, as specified by the
| |
| header | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the header value(s), if any, for the header with the given name. Returns an empty list if no header values are found. | |
| host | back to summary |
|---|---|
| public InetSocketAddress host() Implements org. Doc from org. Get the value of the If the header value does not contain a port, the
port in the returned address will
be
| |
| range | back to summary |
|---|---|
| public List Implements org. Doc from org. Get the value of the Returns an empty list when the range is unknown.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |