ServerRequest.Builder implementation.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private byte[] | |
| private final MultiValueMap | |
| private final HttpHeaders | |
| private final List | |
| private HttpMethod | |
| private final MultiValueMap | |
| private InetSocketAddress | |
| private final HttpServletRequest | |
| private URI |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ServerRequest. | attribute(String
the attribute name name, Object the attribute value value)Implements org. Add an attribute with the given name and value. |
| public ServerRequest. | attributes(Consumer<Map<String, Object>>
a function that consumes the attributes map attributesConsumer)Implements org. Manipulate this request's attributes with the given consumer. |
| public ServerRequest. | body(byte[]
the new body body)Implements org. Set the body of the request. |
| public ServerRequest. | body(String
the new body body)Implements org. Set the body of the request to the UTF-8 encoded bytes of the given string. |
| public ServerRequest | build()
Implements org. Build the request. |
| public ServerRequest. | cookie(String
the cookie name name, String... the cookie value(s) values)Implements org. Add a cookie with the given name and value(s). |
| public ServerRequest. | cookies(Consumer<MultiValueMap<String, Cookie>>
a function that consumes the cookies map cookiesConsumer)Implements org. Manipulate this request's cookies with the given consumer. |
| public ServerRequest. | header(String
the header name headerName, String... the header value(s) headerValues)Implements org. Add the given header value(s) under the given name. |
| public ServerRequest. | headers(Consumer<HttpHeaders>
a function that consumes the headersConsumer)HttpHeadersImplements org. Manipulate this request's headers with the given consumer. |
| public ServerRequest. | method(HttpMethod
the new method method)Implements org. Set the method of the request. |
| public ServerRequest. | param(String
the parameter name name, String... the parameter value(s) values)Implements org. Add a parameter with the given name and value. |
| public ServerRequest. | params(Consumer<MultiValueMap<String, String>>
a function that consumes the parameters map paramsConsumer)Implements org. Manipulate this request's parameters with the given consumer. |
| public ServerRequest. | remoteAddress(InetSocketAddress
the remote address remoteAddress)Implements org. Set the remote address of the request. |
| public ServerRequest. | uri(URI
the new URI uri)Implements org. Set the URI of the request. |