类 ReactiveHttpRequestValues.Builder
java.lang.Object
cn.taketoday.web.service.invoker.HttpRequestValues.Builder
cn.taketoday.web.service.invoker.ReactiveHttpRequestValues.Builder
Builder for
ReactiveHttpRequestValues.-
字段概要
字段修饰符和类型字段说明private org.reactivestreams.Publisher<?>private cn.taketoday.core.ParameterizedTypeReference<?>private MultipartBodyBuilder -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addAttribute(String name, Object value) Configure an attribute to associate with the request.Add the given cookie name and values.Add the given header name and values.addRequestParameter(String name, String... values) Add the given request parameter name and values.addRequestPart(String name, Object part) Add a part to a multipart request.<T,P extends org.reactivestreams.Publisher<T>>
ReactiveHttpRequestValues.BuilderaddRequestPart(String name, P publisher, cn.taketoday.core.ResolvableType type) <T,P extends org.reactivestreams.Publisher<T>>
ReactiveHttpRequestValues.BuilderaddRequestPartPublisher(String name, P publisher, cn.taketoday.core.ParameterizedTypeReference<T> elementTye) Variant ofaddRequestPart(String, Object)that allows the part value to be produced by aPublisher.build()Build theHttpRequestValuesinstance.protected Objectprotected ReactiveHttpRequestValuescreateRequestValues(HttpMethod httpMethod, URI uri, String uriTemplate, Map<String, String> uriVars, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, String> cookies, Map<String, Object> attributes, Object bodyValue) protected booleanhasBody()protected booleanhasParts()Set the media types for the requestAcceptheader.<T,P extends org.reactivestreams.Publisher<T>>
voidsetBody(P body, cn.taketoday.core.ParameterizedTypeReference<T> elementTye) <T,P extends org.reactivestreams.Publisher<T>>
voidsetBodyPublisher(P body, cn.taketoday.core.ParameterizedTypeReference<T> elementTye) Set the request body as a Reactive Streams Publisher.voidsetBodyValue(Object bodyValue) Set the request body as an Object to be serialized.setContentType(MediaType contentType) Set the media type for the requestContent-Typeheader.setHttpMethod(HttpMethod httpMethod) Set the HTTP method for the request.Set the URL to use.setUriTemplate(String uriTemplate) Set the request URL as a String template.setUriVariable(String name, String value) Add a URI variable name-value pair.
-
字段详细资料
-
multipartBuilder
-
body
@Nullable private org.reactivestreams.Publisher<?> body -
bodyElementType
@Nullable private cn.taketoday.core.ParameterizedTypeReference<?> bodyElementType
-
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
setHttpMethod
从类复制的说明:HttpRequestValues.BuilderSet the HTTP method for the request. -
setUri
从类复制的说明:HttpRequestValues.BuilderSet the URL to use. When set, this overrides the URI template from theHttpExchangeannotation.- 覆盖:
setUri在类中HttpRequestValues.Builder
-
setUriTemplate
从类复制的说明:HttpRequestValues.BuilderSet the request URL as a String template. -
setUriVariable
从类复制的说明:HttpRequestValues.BuilderAdd a URI variable name-value pair. -
setAccept
从类复制的说明:HttpRequestValues.BuilderSet the media types for the requestAcceptheader.- 覆盖:
setAccept在类中HttpRequestValues.Builder
-
setContentType
从类复制的说明:HttpRequestValues.BuilderSet the media type for the requestContent-Typeheader. -
addHeader
从类复制的说明:HttpRequestValues.BuilderAdd the given header name and values.- 覆盖:
addHeader在类中HttpRequestValues.Builder
-
addCookie
从类复制的说明:HttpRequestValues.BuilderAdd the given cookie name and values.- 覆盖:
addCookie在类中HttpRequestValues.Builder
-
addRequestParameter
从类复制的说明:HttpRequestValues.BuilderAdd the given request parameter name and values.When
"content-type"is set to"application/x-www-form-urlencoded", request parameters are encoded in the request body. Otherwise, they are added as URL query parameters. -
addAttribute
从类复制的说明:HttpRequestValues.BuilderConfigure an attribute to associate with the request.- 覆盖:
addAttribute在类中HttpRequestValues.Builder- 参数:
name- the attribute namevalue- the attribute value
-
addRequestPart
Add a part to a multipart request. The part value may be as described inMultipartBodyBuilder.part(String, Object). -
addRequestPartPublisher
public <T,P extends org.reactivestreams.Publisher<T>> ReactiveHttpRequestValues.Builder addRequestPartPublisher(String name, P publisher, cn.taketoday.core.ParameterizedTypeReference<T> elementTye) Variant ofaddRequestPart(String, Object)that allows the part value to be produced by aPublisher. -
addRequestPart
public <T,P extends org.reactivestreams.Publisher<T>> ReactiveHttpRequestValues.Builder addRequestPart(String name, P publisher, cn.taketoday.core.ResolvableType type) -
setBodyValue
Set the request body as an Object to be serialized.This is mutually exclusive with, and resets any previously set setBodyPublisher(Publisher, ParameterizedTypeReference).
-
setBodyPublisher
public <T,P extends org.reactivestreams.Publisher<T>> void setBodyPublisher(P body, cn.taketoday.core.ParameterizedTypeReference<T> elementTye) Set the request body as a Reactive Streams Publisher.This is mutually exclusive with, and resets any previously set body value.
-
setBody
public <T,P extends org.reactivestreams.Publisher<T>> void setBody(P body, cn.taketoday.core.ParameterizedTypeReference<T> elementTye) -
build
从类复制的说明:HttpRequestValues.BuilderBuild theHttpRequestValuesinstance.- 覆盖:
build在类中HttpRequestValues.Builder
-
hasParts
protected boolean hasParts()- 覆盖:
hasParts在类中HttpRequestValues.Builder
-
hasBody
protected boolean hasBody()- 覆盖:
hasBody在类中HttpRequestValues.Builder
-
buildMultipartBody
-
createRequestValues
protected ReactiveHttpRequestValues createRequestValues(@Nullable HttpMethod httpMethod, @Nullable URI uri, @Nullable String uriTemplate, Map<String, String> uriVars, HttpHeaders headers, cn.taketoday.util.MultiValueMap<String, String> cookies, Map<String, Object> attributes, @Nullable Object bodyValue)
-