类 DefaultClientRequestBuilder
java.lang.Object
cn.taketoday.web.reactive.function.client.DefaultClientRequestBuilder
- 所有已实现的接口:
ClientRequest.Builder
Default implementation of
ClientRequest.Builder.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private BodyInserter<?,? super ClientHttpRequest> private final HttpHeadersprivate Consumer<ClientHttpRequest>private HttpMethodprivate URI -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Set the attribute with the given name to the given value.attributes(Consumer<Map<String, Object>> attributesConsumer) Manipulate the request attributes with the given consumer.body(BodyInserter<?, ? super ClientHttpRequest> inserter) Set the body of the request to the givenBodyInserter.<S,P extends org.reactivestreams.Publisher<S>>
ClientRequest.Builderbody(P publisher, cn.taketoday.core.ParameterizedTypeReference<S> typeReference) Set the body of the request to the givenPublisherand return it.<S,P extends org.reactivestreams.Publisher<S>>
ClientRequest.BuilderSet the body of the request to the givenPublisherand return it.build()Build the request.Add a cookie with the given name and value(s).Manipulate this request's cookies with the given consumer.Add the given header value(s) under the given name.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this request's headers with the given consumer.httpRequest(Consumer<ClientHttpRequest> requestConsumer) Callback for access to theClientHttpRequestthat in turn provides access to the native request of the underlying HTTP library.method(HttpMethod method) Set the method of the request.Set the url of the request.
-
字段详细资料
-
method
-
url
-
headers
-
cookies
-
attributes
-
body
-
httpRequestConsumer
-
-
构造器详细资料
-
DefaultClientRequestBuilder
-
DefaultClientRequestBuilder
-
-
方法详细资料
-
method
从接口复制的说明:ClientRequest.BuilderSet the method of the request.- 指定者:
method在接口中ClientRequest.Builder- 参数:
method- the new method- 返回:
- this builder
-
url
从接口复制的说明:ClientRequest.BuilderSet the url of the request.- 指定者:
url在接口中ClientRequest.Builder- 参数:
url- the new url- 返回:
- this builder
-
header
从接口复制的说明:ClientRequest.BuilderAdd the given header value(s) under the given name.- 指定者:
header在接口中ClientRequest.Builder- 参数:
headerName- the header nameheaderValues- the header value(s)- 返回:
- this builder
- 另请参阅:
-
headers
从接口复制的说明:ClientRequest.BuilderManipulate 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 otherHttpHeadersmethods.- 指定者:
headers在接口中ClientRequest.Builder- 参数:
headersConsumer- a function that consumes theHttpHeaders- 返回:
- this builder
-
cookie
从接口复制的说明:ClientRequest.BuilderAdd a cookie with the given name and value(s).- 指定者:
cookie在接口中ClientRequest.Builder- 参数:
name- the cookie namevalues- the cookie value(s)- 返回:
- this builder
-
cookies
public ClientRequest.Builder cookies(Consumer<cn.taketoday.util.MultiValueMap<String, String>> cookiesConsumer) 从接口复制的说明:ClientRequest.BuilderManipulate 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 otherMultiValueMapmethods.- 指定者:
cookies在接口中ClientRequest.Builder- 参数:
cookiesConsumer- a function that consumes the cookies map- 返回:
- this builder
-
body
public <S,P extends org.reactivestreams.Publisher<S>> ClientRequest.Builder body(P publisher, Class<S> elementClass) 从接口复制的说明:ClientRequest.BuilderSet the body of the request to the givenPublisherand return it.- 指定者:
body在接口中ClientRequest.Builder- 类型参数:
S- the type of the elements contained in the publisherP- the type of thePublisher- 参数:
publisher- thePublisherto write to the requestelementClass- the class of elements contained in the publisher- 返回:
- the built request
-
body
public <S,P extends org.reactivestreams.Publisher<S>> ClientRequest.Builder body(P publisher, cn.taketoday.core.ParameterizedTypeReference<S> typeReference) 从接口复制的说明:ClientRequest.BuilderSet the body of the request to the givenPublisherand return it.- 指定者:
body在接口中ClientRequest.Builder- 类型参数:
S- the type of the elements contained in the publisherP- the type of thePublisher- 参数:
publisher- thePublisherto write to the requesttypeReference- a type reference describing the elements contained in the publisher- 返回:
- the built request
-
attribute
从接口复制的说明:ClientRequest.BuilderSet the attribute with the given name to the given value.- 指定者:
attribute在接口中ClientRequest.Builder- 参数:
name- the name of the attribute to addvalue- the value of the attribute to add- 返回:
- this builder
-
attributes
从接口复制的说明:ClientRequest.BuilderManipulate 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.- 指定者:
attributes在接口中ClientRequest.Builder- 参数:
attributesConsumer- a function that consumes the attributes- 返回:
- this builder
-
httpRequest
从接口复制的说明:ClientRequest.BuilderCallback for access to theClientHttpRequestthat in turn provides access to the native request of the underlying HTTP library. This could be useful for setting advanced, per-request options that exposed by the underlying library.- 指定者:
httpRequest在接口中ClientRequest.Builder- 参数:
requestConsumer- a consumer to access theClientHttpRequestwith- 返回:
- this builder
-
body
从接口复制的说明:ClientRequest.BuilderSet the body of the request to the givenBodyInserter.- 指定者:
body在接口中ClientRequest.Builder- 参数:
inserter- theBodyInserterthat writes to the request- 返回:
- this builder
-
build
从接口复制的说明:ClientRequest.BuilderBuild the request.- 指定者:
build在接口中ClientRequest.Builder
-