Interface HttpTransportBuilder


public interface HttpTransportBuilder
A builder interface for configuring and creating HttpTransport instances.

Transport modules (Apache HC, Java HTTP Client, OkHttp, etc.) implement this interface to expose their configuration options in a transport-agnostic way. The built transport is then passed to RestClient.Builder.transport(HttpTransport).

Example usage:

// Transport-specific options (here, the underlying Apache client) are set on the concrete builder. HttpTransport transport = ApacheHc5Transport.builder() .httpClient(myCloseableHttpClient) .build(); RestClient client = RestClient.create() .transport(transport) .build();

See Also:
Since:
9.2.1
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds and returns a configured HttpTransport instance.