Package org.springframework.http.client.reactive

# Interface ClientHttpConnector

All Known Implementing Classes:
  `HttpComponentsClientHttpConnector`, `JdkClientHttpConnector`, `JettyClientHttpConnector`, `ReactorClientHttpConnector`, `ReactorNetty2ClientHttpConnector`

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 a `ClientHttpRequest` and receive a `ClientHttpResponse`.

Since:
  5.0
Author:
  Brian Clozel

## Method Summary

Modifier and Type
Method
Description
`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 given `HttpMethod` and `URI` and apply the given `requestCallback` when the HTTP request of the underlying API can be initialized and written to.

## Method Details

### 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 given `HttpMethod` and `URI` and apply the given `requestCallback` when the HTTP request of the underlying API can be initialized and written to.

Parameters:
  `method` - the HTTP request method
  `uri` - the HTTP request URI
  `requestCallback` - 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()`.
Returns:
  publisher for the `ClientHttpResponse`