Package | Description |
---|---|
org.springframework.web.reactive.function.client |
Provides a reactive
WebClient
that builds on top of the
org.springframework.http.client.reactive reactive HTTP adapter layer. |
Modifier and Type | Method and Description |
---|---|
ClientResponse.Builder |
ClientResponse.Builder.body(reactor.core.publisher.Flux<DataBuffer> body)
Set the body of the response.
|
ClientResponse.Builder |
ClientResponse.Builder.body(Function<reactor.core.publisher.Flux<DataBuffer>,reactor.core.publisher.Flux<DataBuffer>> transformer)
Transform the response body, if set in the builder.
|
ClientResponse.Builder |
ClientResponse.Builder.body(String body)
Set the body of the response to the UTF-8 encoded bytes of the given string.
|
ClientResponse.Builder |
ClientResponse.Builder.cookie(String name,
String... values)
Add a cookie with the given name and value(s).
|
ClientResponse.Builder |
ClientResponse.Builder.cookies(Consumer<MultiValueMap<String,ResponseCookie>> cookiesConsumer)
Manipulate this response's cookies with the given consumer.
|
static ClientResponse.Builder |
ClientResponse.create(HttpStatus statusCode)
Create a response builder with the given status code and using default strategies for
reading the body.
|
static ClientResponse.Builder |
ClientResponse.create(HttpStatus statusCode,
ExchangeStrategies strategies)
Create a response builder with the given status code and strategies for reading the body.
|
static ClientResponse.Builder |
ClientResponse.create(HttpStatus statusCode,
List<HttpMessageReader<?>> messageReaders)
Create a response builder with the given status code and message body readers.
|
static ClientResponse.Builder |
ClientResponse.create(int statusCode,
ExchangeStrategies strategies)
Create a response builder with the given raw status code and strategies for reading the body.
|
static ClientResponse.Builder |
ClientResponse.from(ClientResponse other)
Deprecated.
as of 5.3 in favor of the instance based
ClientResponse.mutate() . |
ClientResponse.Builder |
ClientResponse.Builder.header(String headerName,
String... headerValues)
Add the given header value(s) under the given name.
|
ClientResponse.Builder |
ClientResponse.Builder.headers(Consumer<HttpHeaders> headersConsumer)
Manipulate this response's headers with the given consumer.
|
default ClientResponse.Builder |
ClientResponse.mutate()
Return a builder to mutate the this response, for example to change
the status, headers, cookies, and replace or transform the body.
|
ClientResponse.Builder |
ClientResponse.Builder.rawStatusCode(int statusCode)
Set the raw status code of the response.
|
ClientResponse.Builder |
ClientResponse.Builder.request(HttpRequest request)
Set the request associated with the response.
|
ClientResponse.Builder |
ClientResponse.Builder.statusCode(HttpStatus statusCode)
Set the status code of the response.
|