public interface ClientHttpConnector
ClientHttpRequest
and receive a ClientHttpResponse
.Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<ClientHttpResponse> |
connect(HttpMethod method,
java.net.URI uri,
java.util.function.Function<? super ClientHttpRequest,reactor.core.publisher.Mono<java.lang.Void>> requestCallback)
Connect to the origin server using the given
HttpMethod and
URI and apply the given requestCallback when the HTTP
request of the underlying API can be initialized and written to. |
reactor.core.publisher.Mono<ClientHttpResponse> connect(HttpMethod method, java.net.URI uri, java.util.function.Function<? super ClientHttpRequest,reactor.core.publisher.Mono<java.lang.Void>> requestCallback)
HttpMethod
and
URI
and apply the given requestCallback
when 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 a Mono<Void>
by calling
ReactiveHttpOutputMessage.writeWith(org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer>)
or ReactiveHttpOutputMessage.setComplete()
.ClientHttpResponse