public static interface ClientResponse.Builder
Modifier and Type | Method and Description |
---|---|
ClientResponse.Builder |
body(reactor.core.publisher.Flux<DataBuffer> body)
Sets the body of the response.
|
ClientResponse.Builder |
body(java.lang.String body)
Sets the body of the response to the UTF-8 encoded bytes of the given string.
|
ClientResponse |
build()
Builds the response.
|
ClientResponse.Builder |
cookie(java.lang.String name,
java.lang.String... values)
Add a cookie with the given name and value(s).
|
ClientResponse.Builder |
cookies(java.util.function.Consumer<MultiValueMap<java.lang.String,ResponseCookie>> cookiesConsumer)
Manipulate this response's cookies with the given consumer.
|
ClientResponse.Builder |
header(java.lang.String headerName,
java.lang.String... headerValues)
Add the given header value(s) under the given name.
|
ClientResponse.Builder |
headers(java.util.function.Consumer<HttpHeaders> headersConsumer)
Manipulate this response's headers with the given consumer.
|
ClientResponse.Builder |
statusCode(HttpStatus statusCode)
Set the status code of the response.
|
ClientResponse.Builder statusCode(HttpStatus statusCode)
statusCode
- the new status code.ClientResponse.Builder header(java.lang.String headerName, java.lang.String... headerValues)
headerName
- the header nameheaderValues
- the header value(s)HttpHeaders.add(String, String)
ClientResponse.Builder headers(java.util.function.Consumer<HttpHeaders> headersConsumer)
HttpHeaders
methods.headersConsumer
- a function that consumes the HttpHeaders
ClientResponse.Builder cookie(java.lang.String name, java.lang.String... values)
name
- the cookie namevalues
- the cookie value(s)ClientResponse.Builder cookies(java.util.function.Consumer<MultiValueMap<java.lang.String,ResponseCookie>> cookiesConsumer)
MultiValueMap
methods.cookiesConsumer
- a function that consumes the cookies mapClientResponse.Builder body(reactor.core.publisher.Flux<DataBuffer> body)
body
- the new body.ClientResponse.Builder body(java.lang.String body)
body
- the new body.ClientResponse build()