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

dispatcher

var dispatcher: CoroutineDispatcher?

The CoroutineDispatcher that will be used for the client requests.

pipelining

var pipelining: Boolean

Enable http pipelining advice.

response

val response: HttpResponseConfig

Configuration for http response.

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.