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(java.lang.String contextPath)
Set the contextPath to use.
|
ServerHttpRequest.Builder |
header(java.lang.String key,
java.lang.String value)
Set or override the specified header.
|
ServerHttpRequest.Builder |
headers(java.util.function.Consumer<HttpHeaders> headersConsumer)
Manipulate request headers.
|
ServerHttpRequest.Builder |
method(HttpMethod httpMethod)
Set the HTTP method to return.
|
ServerHttpRequest.Builder |
path(java.lang.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(java.net.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(java.net.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(java.lang.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(java.lang.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(java.lang.String key, java.lang.String value)
ServerHttpRequest.Builder headers(java.util.function.Consumer<HttpHeaders> headersConsumer)
HttpHeaders
contains
current request headers, so that the Consumer
can
overwrite or
remove existing values, or
use any other HttpHeaders
methods.ServerHttpRequest.Builder sslInfo(SslInfo sslInfo)
ServerHttpRequest build()
ServerHttpRequest
decorator with the mutated properties.