Currently, the SDK instantiates OkHttpClient internally with no timeout or interceptor configuration:
// HttpClient.java (internal)
this.httpClient = new OkHttpClient();
ApiConfiguration.builder() only exposes url and accessToken, leaving no public API to configure the underlying HTTP client. This means users cannot set connect/read/write timeouts, add interceptors, configure retries, or customize TLS.
Suggested fix: Accept an optional OkHttpClient in the builder:
ApiConfiguration.builder()
.url(...)
.accessToken(...)
.httpClient(myConfiguredClient) // optional, falls back to new OkHttpClient()
.build();
The openapi-generator's ApiClient is a good reference. It supports both a constructor that accepts a pre-built OkHttpClient and individual setter methods for timeouts.
As a current workaround, one could use reflection to replace the private field after instantiation, which is fragile across SDK versions.
Currently, the SDK instantiates OkHttpClient internally with no timeout or interceptor configuration:
ApiConfiguration.builder() only exposes url and accessToken, leaving no public API to configure the underlying HTTP client. This means users cannot set connect/read/write timeouts, add interceptors, configure retries, or customize TLS.
Suggested fix: Accept an optional OkHttpClient in the builder:
The openapi-generator's ApiClient is a good reference. It supports both a constructor that accepts a pre-built OkHttpClient and individual setter methods for timeouts.
As a current workaround, one could use reflection to replace the private field after instantiation, which is fragile across SDK versions.