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