public static interface ServerHttpRequest.Builder
ServerHttpRequest
.Modifier and Type | Method and Description |
---|---|
ServerHttpRequest |
build()
Build a
ServerHttpRequest decorator with the mutated properties. |
ServerHttpRequest.Builder |
contextPath(String contextPath)
Set the contextPath to use.
|
ServerHttpRequest.Builder |
header(String headerName,
String... headerValues)
Set or override the specified header values under the given name.
|
ServerHttpRequest.Builder |
headers(Consumer<HttpHeaders> headersConsumer)
Manipulate request headers.
|
ServerHttpRequest.Builder |
method(HttpMethod httpMethod)
Set the HTTP method to return.
|
ServerHttpRequest.Builder |
path(String path)
Set the path to use instead of the
"rawPath" of the URI of
the request with the following conditions:
If uri is also set, the path given here
overrides the path of the given URI. |
ServerHttpRequest.Builder |
sslInfo(SslInfo sslInfo)
Set the SSL session information.
|
ServerHttpRequest.Builder |
uri(URI uri)
Set the URI to use with the following conditions:
If
path is also set, it overrides the path
of the URI provided here. |
ServerHttpRequest.Builder method(HttpMethod httpMethod)
ServerHttpRequest.Builder uri(URI uri)
path
is also set, it overrides the path
of the URI provided here.
contextPath
is also set, or
already present, it must match the start of the path of the URI
provided here.
ServerHttpRequest.Builder path(String path)
"rawPath"
of the URI of
the request with the following conditions:
uri
is also set, the path given here
overrides the path of the given URI.
contextPath
is also set, or
already present, it must match the start of the path given here.
ServerHttpRequest.Builder contextPath(String contextPath)
The given value must be a valid contextPath
and it must match the start of the path of the URI of
the request. That means changing the contextPath, implies also
changing the path via path(String)
.
ServerHttpRequest.Builder header(String headerName, String... headerValues)
If you need to add header values, remove headers, etc., use
headers(Consumer)
for greater control.
headerName
- the header nameheaderValues
- the header valuesheaders(Consumer)
ServerHttpRequest.Builder headers(Consumer<HttpHeaders> headersConsumer)
HttpHeaders
contains
current request headers, so that the Consumer
can
overwrite or
remove existing values, or
use any other HttpHeaders
methods.header(String, String...)
ServerHttpRequest.Builder sslInfo(SslInfo sslInfo)
ServerHttpRequest build()
ServerHttpRequest
decorator with the mutated properties.