1. HTTP Client Support

Spring CredHub CredHubOperations supports multiple HTTP client libraries to communicate with the CredHub API. The following libraries are supported:

Choosing a specific client library requires the appropriate dependency to be available on the application classpath. The application classpath will be inspected for each client library in the order listed above.

Spring CredHub ReactiveCredHubOperations only supports the Netty HTTP client library.

1.1. Apache HttpComponents

To use Apache HttpComponents to communicate with CredHub, add the following dependency to the application:

<dependency>
  <groupId>org.apache.httpcomponents</groupId>
  <artifactId>httpclient</artifactId>
</dependency>

1.2. OkHttp 3

To use OkHttp 3 to communicate with CredHub, add the following dependency to the application:

<dependency>
  <groupId>com.squareup.okhttp3</groupId>
  <artifactId>okhttp</artifactId>
</dependency>

1.3. Netty

To use Netty to communicate with CredHub, add the following dependency to the application:

<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-all</artifactId>
</dependency>