OkHttpConfig
class OkHttpConfig : HttpClientEngineConfig
Configuration for OkHttp client engine.
Constructors
OkHttpConfig() Configuration for OkHttp client engine. |
Properties
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. |
Inherited Properties
var pipelining: Boolean Enable http pipelining advice. |
|
var proxy: ProxyConfig? Proxy address to use. Use system proxy by default. |
|
val |
|
var threadsCount: Int Network threads count advice. |
Functions
fun addInterceptor(interceptor: Interceptor): Unit Add Interceptor to OkHttp client. |
|
fun addNetworkInterceptor(interceptor: Interceptor): Unit Add network Interceptor to OkHttp client. |
|
Configure OkHttpClient using OkHttpClient.Builder. |