ClientRequest.Builder .
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private BodyInserter | |
| private final MultiValueMap | |
| private final HttpHeaders | |
| private Consumer | |
| private HttpMethod | |
| private URI |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ClientRequest. | attribute(String
the name of the attribute to add name, Object the value of the attribute to add value)Implements org. Set the attribute with the given name to the given value. |
| public ClientRequest. | attributes(Consumer<Map<String, Object>>
a function that consumes the attributes attributesConsumer)Implements org. Manipulate the request attributes with the given consumer. |
| public <S, P extends Publisher | body(P
the publisher, Class<S> Publisher to write to the requestthe class of elements contained in the publisher elementClass)Implements org. Set the body of the request to the given |
| public <S, P extends Publisher | body(P
the publisher, ParameterizedTypeReference<S> Publisher to write to the requesta type reference describing the elements contained in the publisher typeReference)Implements org. Set the body of the request to the given |
| public ClientRequest. | body(BodyInserter<?, ? super ClientHttpRequest>
the inserter)BodyInserter that writes to the requestImplements org. Set the body of the request to the given |
| public ClientRequest | build()
Implements org. Build the request. |
| public ClientRequest. | cookie(String
the cookie name name, String... the cookie value(s) values)Implements org. Add a cookie with the given name and value(s). |
| public ClientRequest. | cookies(Consumer<MultiValueMap<String, String>>
a function that consumes the cookies map cookiesConsumer)Implements org. Manipulate this request's cookies with the given consumer. |
| public ClientRequest. | header(String
the header name headerName, String... the header value(s) headerValues)Implements org. Add the given header value(s) under the given name. |
| public ClientRequest. | headers(Consumer<HttpHeaders>
a function that consumes the headersConsumer)HttpHeadersImplements org. Manipulate this request's headers with the given consumer. |
| public ClientRequest. | httpRequest(Consumer<ClientHttpRequest>
a consumer to access the
requestConsumer)ClientHttpRequest withImplements org. Callback for access to the |
| public ClientRequest. | method(HttpMethod
the new method method)Implements org. Set the method of the request. |
| public ClientRequest. | url(URI
the new url url)Implements org. Set the url of the request. |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| body | back to summary |
|---|---|
| private BodyInserter<?, ? super ClientHttpRequest> body | |
| cookies | back to summary |
|---|---|
| private final MultiValueMap<String, String> cookies | |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| httpRequestConsumer | back to summary |
|---|---|
| private Consumer<ClientHttpRequest> httpRequestConsumer
| |
| method | back to summary |
|---|---|
| private HttpMethod method | |
| url | back to summary |
|---|---|
| private URI url | |
| DefaultClientRequestBuilder | back to summary |
|---|---|
| public DefaultClientRequestBuilder(ClientRequest other) | |
| DefaultClientRequestBuilder | back to summary |
|---|---|
| public DefaultClientRequestBuilder(HttpMethod method, URI url) | |
| attribute | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Set the attribute with the given name to the given value.
| |
| attributes | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Manipulate the request attributes with the given consumer. The attributes provided to the consumer are "live", so that the consumer can be used to inspect attributes, remove attributes, or use any of the other map-provided methods. | |
| body | back to summary |
|---|---|
| public <S, P extends Publisher Implements org. Doc from org. Set the body of the request to the given
| |
| body | back to summary |
|---|---|
| public <S, P extends Publisher Implements org. Doc from org. Set the body of the request to the given
| |
| body | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Set the body of the request to the given
| |
| build | back to summary |
|---|---|
| public ClientRequest build() Implements org. Doc from org. Build the request.
| |
| cookie | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Add a cookie with the given name and value(s).
| |
| cookies | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Manipulate this request's cookies with the given consumer. The
map provided to the consumer is "live", so that the consumer can be used to
overwrite existing cookie values,
remove cookies, or use any of the other
| |
| header | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Add the given header value(s) under the given name.
| |
| headers | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Manipulate this request's headers with the given consumer. The
headers provided to the consumer are "live", so that the consumer can be used to
overwrite existing header values,
remove values, or use any of the other
| |
| httpRequest | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Callback for access to the
| |
| method | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Set the method of the request.
| |
| url | back to summary |
|---|---|
| public ClientRequest. Implements org. Doc from org. Set the url of the request.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final BodyInserter | |
| private final MultiValueMap | |
| private final HttpHeaders | |
| private final Consumer | |
| private final String | |
| private final HttpMethod | |
| private final URI |
| Access | Constructor and Description |
|---|---|
| public | BodyInserterRequest(HttpMethod method, URI url, HttpHeaders headers, MultiValueMap<String, String> cookies, BodyInserter<?, ? super ClientHttpRequest> body, Map<String, Object> attributes, Consumer<ClientHttpRequest> httpRequestConsumer)
|
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| body | back to summary |
|---|---|
| private final BodyInserter<?, ? super ClientHttpRequest> body | |
| cookies | back to summary |
|---|---|
| private final MultiValueMap<String, String> cookies | |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| httpRequestConsumer | back to summary |
|---|---|
| private final Consumer<ClientHttpRequest> httpRequestConsumer
| |
| logPrefix | back to summary |
|---|---|
| private final String logPrefix | |
| method | back to summary |
|---|---|
| private final HttpMethod method | |
| url | back to summary |
|---|---|
| private final URI url | |
| BodyInserterRequest | back to summary |
|---|---|
| public BodyInserterRequest(HttpMethod method, URI url, HttpHeaders headers, MultiValueMap<String, String> cookies, BodyInserter<?, ? super ClientHttpRequest> body, Map<String, Object> attributes, Consumer<ClientHttpRequest> httpRequestConsumer) | |
| attributes | back to summary |
|---|---|
| public Map Implements org. Doc from org. Return the attributes of this request.
| |
| body | back to summary |
|---|---|
| public BodyInserter Implements org. Doc from org. Return the body inserter of this request.
| |
| cookies | back to summary |
|---|---|
| public MultiValueMap Implements org. Doc from org. Return the cookies of this request.
| |
| headers | back to summary |
|---|---|
| public HttpHeaders headers() Implements org. Doc from org. Return the headers of this request.
| |
| httpRequest | back to summary |
|---|---|
| public Consumer Implements org. Doc from org. Return consumer(s) configured to access to the
| |
| logPrefix | back to summary |
|---|---|
| public String logPrefix() Implements org. Doc from org. Return a log message prefix to use to correlate messages for this request.
The prefix is based on the value of the attribute
| |
| method | back to summary |
|---|---|
| public HttpMethod method() Implements org. Doc from org. Return the HTTP method.
| |
| url | back to summary |
|---|---|
| public URI url() Implements org. Doc from org. Return the request URI.
| |
| writeTo | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Write this request to the given
| |