Class HttpComponentsClientHttpConnector

java.lang.Object
org.springframework.http.client.reactive.HttpComponentsClientHttpConnector
All Implemented Interfaces:
Closeable, AutoCloseable, ClientHttpConnector

public class HttpComponentsClientHttpConnector extends Object implements ClientHttpConnector, Closeable
ClientHttpConnector implementation for the Apache HttpComponents HttpClient 5.x.
Since:
5.3
Author:
Martin Tarjányi, Arjen Poutsma
See Also:
  • Constructor Details

    • HttpComponentsClientHttpConnector

      public HttpComponentsClientHttpConnector()
      Default constructor that creates and starts a new instance of CloseableHttpAsyncClient.
    • HttpComponentsClientHttpConnector

      public HttpComponentsClientHttpConnector(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client)
      Constructor with a pre-configured CloseableHttpAsyncClient instance.
      Parameters:
      client - the client to use
    • HttpComponentsClientHttpConnector

      public HttpComponentsClientHttpConnector(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client, BiFunction<HttpMethod,URI,? extends org.apache.hc.client5.http.protocol.HttpClientContext> contextProvider)
      Constructor with a pre-configured CloseableHttpAsyncClient instance and a HttpClientContext supplier lambda which is called before each request and passed to the client.
      Parameters:
      client - the client to use
      contextProvider - a HttpClientContext supplier
  • Method Details