Skip to main content

Usage

Client configuration

Configure the client using system properties or environment variables:
Or manually:
Or using a combination of the two approaches:
See this table for the available options: System properties take precedence over environment variables.
[!TIP] Don’t create more than one client in the same application. Each client has a connection pool and thread pools, which are more efficient to share between requests.

Modifying configuration

To temporarily use a modified client configuration, while reusing the same connection and thread pools, call withOptions() on any client or service:
The withOptions() method does not affect the original client or service.

Asynchronous execution

The default client is synchronous. To switch to asynchronous execution, call the async() method:
Or create an asynchronous client from the beginning:
The asynchronous client supports the same options as the synchronous one, except most methods return CompletableFutures.