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 this request's headers with the given consumer.
|
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
HttpRequest.getURI() . |
ServerHttpRequest.Builder |
uri(java.net.URI uri)
Set the URI to return.
|
ServerHttpRequest.Builder method(HttpMethod httpMethod)
ServerHttpRequest.Builder uri(java.net.URI uri)
ServerHttpRequest.Builder path(java.lang.String path)
"rawPath"
of
HttpRequest.getURI()
.ServerHttpRequest.Builder contextPath(java.lang.String contextPath)
ServerHttpRequest.Builder header(java.lang.String key, java.lang.String value)
ServerHttpRequest.Builder headers(java.util.function.Consumer<HttpHeaders> headersConsumer)
HttpHeaders
methods.headersConsumer
- a function that consumes the HttpHeaders
ServerHttpRequest build()
ServerHttpRequest
decorator with the mutated properties.