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 |
---|---|
ClientRequest.Builder |
ClientRequest.Builder.attribute(String name,
Object value)
Set the attribute with the given name to the given value.
|
ClientRequest.Builder |
ClientRequest.Builder.attributes(Consumer<Map<String,Object>> attributesConsumer)
Manipulate the request attributes with the given consumer.
|
ClientRequest.Builder |
ClientRequest.Builder.body(BodyInserter<?,? super ClientHttpRequest> inserter)
Set the body of the request to the given
BodyInserter . |
<S,P extends org.reactivestreams.Publisher<S>> |
ClientRequest.Builder.body(P publisher,
Class<S> elementClass)
Set the body of the request to the given
Publisher and return it. |
<S,P extends org.reactivestreams.Publisher<S>> |
ClientRequest.Builder.body(P publisher,
ParameterizedTypeReference<S> typeReference)
Set the body of the request to the given
Publisher and return it. |
ClientRequest.Builder |
ClientRequest.Builder.cookie(String name,
String... values)
Add a cookie with the given name and value(s).
|
ClientRequest.Builder |
ClientRequest.Builder.cookies(Consumer<MultiValueMap<String,String>> cookiesConsumer)
Manipulate this request's cookies with the given consumer.
|
static ClientRequest.Builder |
ClientRequest.create(HttpMethod method,
URI url)
Create a request builder with the given method and url.
|
static ClientRequest.Builder |
ClientRequest.from(ClientRequest other)
Create a builder with the method, URI, headers, and cookies of the given request.
|
ClientRequest.Builder |
ClientRequest.Builder.header(String headerName,
String... headerValues)
Add the given header value(s) under the given name.
|
ClientRequest.Builder |
ClientRequest.Builder.headers(Consumer<HttpHeaders> headersConsumer)
Manipulate this request's headers with the given consumer.
|
ClientRequest.Builder |
ClientRequest.Builder.httpRequest(Consumer<ClientHttpRequest> requestConsumer)
Callback for access to the
ClientHttpRequest that in turn
provides access to the native request of the underlying HTTP library. |
ClientRequest.Builder |
ClientRequest.Builder.method(HttpMethod method)
Set the method of the request.
|
static ClientRequest.Builder |
ClientRequest.method(HttpMethod method,
URI url)
Deprecated.
in favor of
ClientRequest.create(HttpMethod, URI) |
ClientRequest.Builder |
ClientRequest.Builder.url(URI url)
Set the url of the request.
|