class OkHttpConfig : HttpClientEngineConfig
Configuration for OkHttp client engine.
OkHttpConfig()
Configuration for OkHttp client engine. |
var clientCacheSize: Int
Size of the cache that keeps least recently used OkHttpClient instances. Set "0" to avoid caching. |
|
var preconfigured: OkHttpClient?
Preconfigured OkHttpClient instance instead of configuring one. |
|
var webSocketFactory: Factory?
If provided, this WebSocket.Factory will be used to create WebSocket instances. Otherwise, OkHttpClient is used directly. |
fun addInterceptor(interceptor: Interceptor): Unit
Add Interceptor to OkHttp client. |
|
fun addNetworkInterceptor(interceptor: Interceptor): Unit
Add network Interceptor to OkHttp client. |
|
fun config(block: Builder.() -> Unit): Unit
Configure OkHttpClient using OkHttpClient.Builder. |