类 DefaultClientResponseBuilder
java.lang.Object
cn.taketoday.web.reactive.function.client.DefaultClientResponseBuilder
- 所有已实现的接口:
ClientResponse.Builder
Default implementation of
ClientResponse.Builder.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Harry Yang
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>private cn.taketoday.util.MultiValueMap<String,ResponseCookie> private static final HttpRequestprivate HttpHeadersprivate ClientResponseprivate HttpRequestprivate HttpStatusCodeprivate final ExchangeStrategies -
构造器概要
构造器构造器说明DefaultClientResponseBuilder(ClientResponse other, boolean mutate) DefaultClientResponseBuilder(ExchangeStrategies strategies) -
方法概要
修饰符和类型方法说明Set the body of the response to the UTF-8 encoded bytes of the given string.body(Function<reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>, reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>> transformer) Transform the response body, if set in the builder.body(reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> body) Set the body of the response.build()Build the response.Add a cookie with the given name and value(s).cookies(Consumer<cn.taketoday.util.MultiValueMap<String, ResponseCookie>> cookiesConsumer) Manipulate this response's cookies with the given consumer.private cn.taketoday.util.MultiValueMap<String,ResponseCookie> private HttpHeadersAdd the given header value(s) under the given name.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.rawStatusCode(int statusCode) Set the raw status code of the response.private voidrequest(HttpRequest request) Set the request associated with the response.statusCode(HttpStatusCode statusCode) Set the status code of the response.
-
字段详细资料
-
EMPTY_REQUEST
-
strategies
-
statusCode
-
headers
-
cookies
-
body
private reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> body -
originalResponse
-
request
-
-
构造器详细资料
-
DefaultClientResponseBuilder
DefaultClientResponseBuilder(ExchangeStrategies strategies) -
DefaultClientResponseBuilder
DefaultClientResponseBuilder(ClientResponse other, boolean mutate)
-
-
方法详细资料
-
statusCode
从接口复制的说明:ClientResponse.BuilderSet the status code of the response.- 指定者:
statusCode在接口中ClientResponse.Builder- 参数:
statusCode- the new status code- 返回:
- this builder
-
rawStatusCode
从接口复制的说明:ClientResponse.BuilderSet the raw status code of the response.- 指定者:
rawStatusCode在接口中ClientResponse.Builder- 参数:
statusCode- the new status code- 返回:
- this builder
-
header
从接口复制的说明:ClientResponse.BuilderAdd the given header value(s) under the given name.- 指定者:
header在接口中ClientResponse.Builder- 参数:
headerName- the header nameheaderValues- the header value(s)- 返回:
- this builder
- 另请参阅:
-
headers
从接口复制的说明:ClientResponse.BuilderManipulate this response'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
HttpHeadersmethods.- 指定者:
headers在接口中ClientResponse.Builder- 参数:
headersConsumer- a function that consumes theHttpHeaders- 返回:
- this builder
-
getHeaders
-
cookie
从接口复制的说明:ClientResponse.BuilderAdd a cookie with the given name and value(s).- 指定者:
cookie在接口中ClientResponse.Builder- 参数:
name- the cookie namevalues- the cookie value(s)- 返回:
- this builder
-
cookies
public ClientResponse.Builder cookies(Consumer<cn.taketoday.util.MultiValueMap<String, ResponseCookie>> cookiesConsumer) 从接口复制的说明:ClientResponse.BuilderManipulate this response'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 values, or use any of the other
MultiValueMapmethods.- 指定者:
cookies在接口中ClientResponse.Builder- 参数:
cookiesConsumer- a function that consumes the cookies map- 返回:
- this builder
-
getCookies
-
body
public ClientResponse.Builder body(Function<reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>, reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>> transformer) 从接口复制的说明:ClientResponse.BuilderTransform the response body, if set in the builder.- 指定者:
body在接口中ClientResponse.Builder- 参数:
transformer- the transformation function to use- 返回:
- this builder
-
body
public ClientResponse.Builder body(reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> body) 从接口复制的说明:ClientResponse.BuilderSet the body of the response.Note: This method will drain the existing body, if set in the builder.
- 指定者:
body在接口中ClientResponse.Builder- 参数:
body- the new body to use- 返回:
- this builder
-
body
从接口复制的说明:ClientResponse.BuilderSet the body of the response to the UTF-8 encoded bytes of the given string.Note: This method will drain the existing body, if set in the builder.
- 指定者:
body在接口中ClientResponse.Builder- 参数:
body- the new body.- 返回:
- this builder
-
releaseBody
private void releaseBody() -
request
从接口复制的说明:ClientResponse.BuilderSet the request associated with the response.- 指定者:
request在接口中ClientResponse.Builder- 参数:
request- the request- 返回:
- this builder
-
build
从接口复制的说明:ClientResponse.BuilderBuild the response.- 指定者:
build在接口中ClientResponse.Builder
-