类 RequestEntity.DefaultBodyBuilder
java.lang.Object
cn.taketoday.http.RequestEntity.DefaultBodyBuilder
- 封闭类:
- RequestEntity<T>
private static class RequestEntity.DefaultBodyBuilder
extends Object
implements RequestEntity.BodyBuilder
-
字段概要
字段修饰符和类型字段说明private final HttpHeadersprivate final HttpMethodprivate final URIprivate final Stringprivate final Object[] -
构造器概要
构造器构造器说明DefaultBodyBuilder(HttpMethod method, String uriTemplate, Object... uriVars) DefaultBodyBuilder(HttpMethod method, String uriTemplate, Map<String, ?> uriVars) DefaultBodyBuilder(HttpMethod method, URI url) -
方法概要
修饰符和类型方法说明Set the list of acceptable media types, as specified by theAcceptheader.acceptCharset(Charset... acceptableCharsets) Set the list of acceptable charsets, as specified by theAccept-Charsetheader.<T> RequestEntity<T>body(T body) Set the body of the request entity and build the RequestEntity.<T> RequestEntity<T>Set the body and type of the request entity and build the RequestEntity.build()Builds the request entity with no body.private <T> RequestEntity<T>buildInternal(T body, Type type) contentLength(long contentLength) Set the length of the body in bytes, as specified by theContent-Lengthheader.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.Add the given, single header value under the given name.headers(HttpHeaders headers) Copy the given headers into the entity's headers map.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this entity's headers with the given consumer.ifModifiedSince(long ifModifiedSince) Set the value of theIf-Modified-Sinceheader.ifModifiedSince(Instant ifModifiedSince) Set the value of theIf-Modified-Sinceheader.ifModifiedSince(ZonedDateTime ifModifiedSince) Set the value of theIf-Modified-Sinceheader.ifNoneMatch(String... ifNoneMatches) Set the values of theIf-None-Matchheader.
-
字段详细资料
-
method
-
headers
-
uri
-
uriTemplate
-
uriVarsArray
-
uriVarsMap
-
-
构造器详细资料
-
DefaultBodyBuilder
DefaultBodyBuilder(HttpMethod method, @Nullable URI url) -
DefaultBodyBuilder
DefaultBodyBuilder(HttpMethod method, @Nullable String uriTemplate, @Nullable Object... uriVars) -
DefaultBodyBuilder
DefaultBodyBuilder(HttpMethod method, @Nullable String uriTemplate, @Nullable Map<String, ?> uriVars)
-
-
方法详细资料
-
header
从接口复制的说明:RequestEntity.HeadersBuilderAdd the given, single header value under the given name.- 指定者:
header在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
headerName- the header nameheaderValues- the header value(s)- 返回:
- this builder
- 另请参阅:
-
headers
从接口复制的说明:RequestEntity.HeadersBuilderCopy the given headers into the entity's headers map.- 指定者:
headers在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
headers- the existing HttpHeaders to copy from- 返回:
- this builder
- 另请参阅:
-
headers
从接口复制的说明:RequestEntity.HeadersBuilderManipulate this entity'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在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
headersConsumer- a function that consumes theHttpHeaders- 返回:
- this builder
-
accept
从接口复制的说明:RequestEntity.HeadersBuilderSet the list of acceptable media types, as specified by theAcceptheader.- 指定者:
accept在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
acceptableMediaTypes- the acceptable media types
-
acceptCharset
从接口复制的说明:RequestEntity.HeadersBuilderSet the list of acceptable charsets, as specified by theAccept-Charsetheader.- 指定者:
acceptCharset在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
acceptableCharsets- the acceptable charsets
-
contentLength
从接口复制的说明:RequestEntity.BodyBuilderSet the length of the body in bytes, as specified by theContent-Lengthheader.- 指定者:
contentLength在接口中RequestEntity.BodyBuilder- 参数:
contentLength- the content length- 返回:
- this builder
- 另请参阅:
-
contentType
从接口复制的说明:RequestEntity.BodyBuilderSet the media type of the body, as specified by theContent-Typeheader.- 指定者:
contentType在接口中RequestEntity.BodyBuilder- 参数:
contentType- the content type- 返回:
- this builder
- 另请参阅:
-
ifModifiedSince
从接口复制的说明:RequestEntity.HeadersBuilderSet the value of theIf-Modified-Sinceheader.- 指定者:
ifModifiedSince在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
ifModifiedSince- the new value of the header
-
ifModifiedSince
从接口复制的说明:RequestEntity.HeadersBuilderSet the value of theIf-Modified-Sinceheader.- 指定者:
ifModifiedSince在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
ifModifiedSince- the new value of the header
-
ifModifiedSince
从接口复制的说明:RequestEntity.HeadersBuilderSet the value of theIf-Modified-Sinceheader.The date should be specified as the number of milliseconds since January 1, 1970 GMT.
- 指定者:
ifModifiedSince在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
ifModifiedSince- the new value of the header
-
ifNoneMatch
从接口复制的说明:RequestEntity.HeadersBuilderSet the values of theIf-None-Matchheader.- 指定者:
ifNoneMatch在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 参数:
ifNoneMatches- the new value of the header
-
build
从接口复制的说明:RequestEntity.HeadersBuilderBuilds the request entity with no body.- 指定者:
build在接口中RequestEntity.HeadersBuilder<RequestEntity.BodyBuilder>- 返回:
- the request entity
- 另请参阅:
-
body
从接口复制的说明:RequestEntity.BodyBuilderSet the body of the request entity and build the RequestEntity.- 指定者:
body在接口中RequestEntity.BodyBuilder- 类型参数:
T- the type of the body- 参数:
body- the body of the request entity- 返回:
- the built request entity
-
body
从接口复制的说明:RequestEntity.BodyBuilderSet the body and type of the request entity and build the RequestEntity.- 指定者:
body在接口中RequestEntity.BodyBuilder- 类型参数:
T- the type of the body- 参数:
body- the body of the request entitytype- the type of the body, useful for generic type resolution- 返回:
- the built request entity
-
buildInternal
-