接口的使用
cn.taketoday.web.reactive.function.client.ClientResponse.Builder
使用ClientResponse.Builder的程序包
程序包
说明
Provides a reactive
WebClient
that builds on top of the
cn.taketoday.http.client.reactive reactive HTTP adapter layer.-
cn.taketoday.web.reactive.function.client中ClientResponse.Builder的使用
修饰符和类型方法说明Set the body of the response to the UTF-8 encoded bytes of the given string.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) Transform the response body, if set in the builder.ClientResponse.Builder.body(reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> body) Set the body of the response.DefaultClientResponseBuilder.body(Function<reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>, reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer>> transformer) DefaultClientResponseBuilder.body(reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> body) Add a cookie with the given name and value(s).ClientResponse.Builder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, ResponseCookie>> cookiesConsumer) Manipulate this response's cookies with the given consumer.DefaultClientResponseBuilder.cookies(Consumer<cn.taketoday.util.MultiValueMap<String, ResponseCookie>> cookiesConsumer) static ClientResponse.BuilderClientResponse.create(int statusCode, ExchangeStrategies strategies) Create a response builder with the given raw status code and strategies for reading the body.static ClientResponse.BuilderClientResponse.create(HttpStatus statusCode) Create a response builder with the given status code and using default strategies for reading the body.static ClientResponse.BuilderClientResponse.create(HttpStatus statusCode, ExchangeStrategies strategies) Create a response builder with the given status code and strategies for reading the body.static ClientResponse.BuilderClientResponse.create(HttpStatus statusCode, List<HttpMessageReader<?>> messageReaders) Create a response builder with the given status code and message body readers.static ClientResponse.BuilderClientResponse.from(ClientResponse other) Create a builder with the status, headers, and cookies of the given response.Add the given header value(s) under the given name.ClientResponse.Builder.headers(Consumer<HttpHeaders> headersConsumer) Manipulate this response's headers with the given consumer.DefaultClientResponseBuilder.headers(Consumer<HttpHeaders> headersConsumer) default ClientResponse.BuilderClientResponse.mutate()Return a builder to mutate this response, for example to change the status, headers, cookies, and replace or transform the body.ClientResponse.Builder.rawStatusCode(int statusCode) Set the raw status code of the response.ClientResponse.Builder.request(HttpRequest request) Set the request associated with the response.DefaultClientResponseBuilder.request(HttpRequest request) ClientResponse.Builder.statusCode(HttpStatusCode statusCode) Set the status code of the response.