OkHttpConfig

class OkHttpConfig : HttpClientEngineConfig

Configuration for OkHttp client engine.

Constructors

<init>

OkHttpConfig()

Configuration for OkHttp client engine.

Properties

preconfigured

var preconfigured: OkHttpClient?

Preconfigured OkHttpClient instance instead of configuring one.

Inherited Properties

pipelining

var pipelining: Boolean

Enable http pipelining advice.

proxy

var proxy: ProxyConfig?

Proxy address to use. Use system proxy by default.

response

val response: Nothing

threadsCount

var threadsCount: Int

Network threads count advice.

Functions

addInterceptor

fun addInterceptor(interceptor: Interceptor): Unit

Add Interceptor to OkHttp client.

addNetworkInterceptor

fun addNetworkInterceptor(interceptor: Interceptor): Unit

Add network Interceptor to OkHttp client.

config

fun config(block: Builder.() -> Unit): Unit

Configure OkHttpClient using OkHttpClient.Builder.