withClient

abstract fun withClient(client: OkHttpClient): ApiClient.Builder

Use an existing OkHttpClient instance and share the Dispatcher, ConnectionPool and Cache

Must not be null.

Previous calls to dispatcher, connectionPool, Cache will be overridden by this call.

Return

the same Builder instance

See also

okhttp3.OkHttpClient

Parameters

client

a non-null OkHttpClient to be shared