setHttpClientProvider

Set a custom GiniHttpClientProvider to provide a configured OkHttpClient.

This allows full control over HTTP client configuration including TLS/SSL settings, proxies, custom interceptors, logging, and more.

Important: The SDK will use your provided client as a base and add its own required configuration on top using OkHttpClient.newBuilder. This ensures:

  • Your custom configuration (proxy, timeouts, interceptors, TLS) is preserved

  • The SDK can add its required headers (User-Agent) and interceptors

  • Both consumer and SDK needs are satisfied

The SDK will only add the User-Agent header if you haven't already set one.

If a provider is set, it will be used instead of the SDK's default client creation. The provider's client will override any HTTP-related settings configured via other builder methods (e.g., setCache, setTrustManager, setConnectionTimeoutInMs).

Return

The builder instance to enable chaining.

Parameters

provider

A GiniHttpClientProvider implementation

See also

for the SDK's default implementation