接口 ClientHttpConnector
public interface ClientHttpConnector
Abstraction over HTTP clients driving the underlying HTTP client to connect to the origin server and provide all necessary infrastructure to send aClientHttpRequestand receive aClientHttpResponse.- 从以下版本开始:
- 5.0
- 作者:
- Brian Clozel
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<ClientHttpResponse>connect(HttpMethod method, URI uri, Function<? super ClientHttpRequest,reactor.core.publisher.Mono<Void>> requestCallback)Connect to the origin server using the givenHttpMethodandURIand apply the givenrequestCallbackwhen the HTTP request of the underlying API can be initialized and written to.
方法详细资料
connect
reactor.core.publisher.Mono<ClientHttpResponse> connect(HttpMethod method, URI uri, Function<? super ClientHttpRequest,reactor.core.publisher.Mono<Void>> requestCallback)
Connect to the origin server using the givenHttpMethodandURIand apply the givenrequestCallbackwhen the HTTP request of the underlying API can be initialized and written to.- 参数:
method- the HTTP request methoduri- the HTTP request URIrequestCallback- a function that prepares and writes to the request, returning a publisher that signals when it's done writing. Implementations can return aMono<Void>by callingReactiveHttpOutputMessage.writeWith(org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer>)orReactiveHttpOutputMessage.setComplete().- 返回:
- publisher for the
ClientHttpResponse