public class DefaultClientWebRequestBuilder extends Object implements ClientWebRequestBuilder
ClientHttpRequest
using a Publisher
as request body.
See static factory methods in ClientWebRequestBuilders
.
ClientWebRequestBuilders
Modifier | Constructor and Description |
---|---|
protected |
DefaultClientWebRequestBuilder() |
|
DefaultClientWebRequestBuilder(HttpMethod httpMethod,
String urlTemplate,
Object... urlVariables) |
|
DefaultClientWebRequestBuilder(HttpMethod httpMethod,
URI url) |
Modifier and Type | Method and Description |
---|---|
DefaultClientWebRequestBuilder |
accept(MediaType... mediaTypes)
Set the Accept request header to the given
MediaType s |
DefaultClientWebRequestBuilder |
accept(String... mediaTypes)
Set the Accept request header to the given media types
|
DefaultClientWebRequestBuilder |
apply(ClientWebRequestPostProcessor postProcessor)
Allows performing more complex operations with a strategy.
|
DefaultClientWebRequestBuilder |
body(Object content)
Use the given object as the request body
|
DefaultClientWebRequestBuilder |
body(org.reactivestreams.Publisher<?> content,
ResolvableType publisherType)
Use the given
Publisher as the request body and use its ResolvableType
as type information for the element published by this reactive stream |
ClientWebRequest |
build() |
DefaultClientWebRequestBuilder |
contentType(MediaType contentType)
Set the Content-Type request header to the given
MediaType |
DefaultClientWebRequestBuilder |
contentType(String contentType)
Set the Content-Type request header to the given media type
|
DefaultClientWebRequestBuilder |
cookie(HttpCookie cookie)
Add a Cookie to the HTTP request
|
DefaultClientWebRequestBuilder |
cookie(String name,
String value)
Add a Cookie to the HTTP request
|
DefaultClientWebRequestBuilder |
header(String name,
String... values)
Add an HTTP request header
|
DefaultClientWebRequestBuilder |
headers(HttpHeaders httpHeaders)
Add all provided HTTP request headers
|
protected DefaultClientWebRequestBuilder()
public DefaultClientWebRequestBuilder(HttpMethod httpMethod, String urlTemplate, Object... urlVariables)
public DefaultClientWebRequestBuilder(HttpMethod httpMethod, URI url)
public DefaultClientWebRequestBuilder header(String name, String... values)
public DefaultClientWebRequestBuilder headers(HttpHeaders httpHeaders)
public DefaultClientWebRequestBuilder contentType(MediaType contentType)
MediaType
public DefaultClientWebRequestBuilder contentType(String contentType)
public DefaultClientWebRequestBuilder accept(MediaType... mediaTypes)
MediaType
spublic DefaultClientWebRequestBuilder accept(String... mediaTypes)
public DefaultClientWebRequestBuilder cookie(String name, String value)
public DefaultClientWebRequestBuilder cookie(HttpCookie cookie)
public DefaultClientWebRequestBuilder apply(ClientWebRequestPostProcessor postProcessor)
ClientWebRequestPostProcessor
implementation might accept the arguments of username
and password and set an HTTP Basic authentication header.postProcessor
- the ClientWebRequestPostProcessor
to use. Cannot be null.public DefaultClientWebRequestBuilder body(Object content)
public DefaultClientWebRequestBuilder body(org.reactivestreams.Publisher<?> content, ResolvableType publisherType)
Publisher
as the request body and use its ResolvableType
as type information for the element published by this reactive streampublic ClientWebRequest build()
build
in interface ClientWebRequestBuilder