build

fun build(baseClient: OkHttpClient, mtlsConfig: MtlsConfig): OkHttpClient

Build an OkHttpClient configured for mutual TLS.

Return

A new OkHttpClient configured for mTLS, or the base client if no valid credentials are available.

Parameters

baseClient

The base OkHttpClient to configure. The returned client will inherit all settings from the base client.

mtlsConfig

The mTLS configuration with client certificate provider.