ServerRequest implementation based on a HttpServletRequest.
| Modifier and Type | Class and Description |
|---|---|
| private static class | DefaultServerRequest.
Simple implementation of |
| pack-priv static class | DefaultServerRequest.
Default implementation of |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final ServerRequest. | |
| private final List | |
| private final MultiValueMap | |
| private MultiValueMap | |
| private final RequestPath | |
| private final ServletServerHttpRequest |
| Access | Constructor and Description |
|---|---|
| public | DefaultServerRequest(HttpServletRequest servletRequest, List<HttpMessageConverter<?>> messageConverters)
|
| Modifier and Type | Method and Description |
|---|---|
| public Optional | attribute(String
the attribute name name)Overrides default org. Get the request attribute value if present. |
| public Map | attributes()
Implements org. Get a mutable map of request attributes. |
| public <T> T | 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(Class<T>
the type of return value bodyType)Implements org. Extract the body as an object of the given type. |
| public <T> T | body(ParameterizedTypeReference<T>
the type of return value bodyType)Implements org. Extract the body as an object of the given type. |
| pack-priv static Class | |
| private <T> T | |
| pack-priv static Optional | |
| public MultiValueMap | cookies()
Implements org. Get the cookies of this request. |
| private List | |
| public ServerRequest. | headers()
Implements org. Get the headers of this request. |
| public List | messageConverters()
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 MultiValueMap | multipartData()
Implements org. Get the parts of a multipart request, provided the Content-Type is
|
| public Optional | param(String
the parameter name name)Overrides default org. Get the first parameter with the given name, if present. |
| public MultiValueMap | params()
Implements org. Get all parameters for this request. |
| public Map | pathVariables()
Implements org. Get all path variables for this request. |
| public Optional | principal()
Implements org. Get the authenticated user for the request, if any. |
| public Optional | remoteAddress()
Implements org. Get the remote address to which this request is connected, if available. |
| public RequestPath | requestPath()
Overrides default org. Get the request path as a |
| public HttpServletRequest | servletRequest()
Implements org. Get the servlet request that this request is based on. |
| public HttpSession | session()
Implements org. Get the web session for this request. |
| public String | |
| public URI | |
| public UriBuilder | uriBuilder()
Implements org. Get a |