OkHttp

A JVM/Android client engine that uses the OkHttp HTTP client. This engine supports Android 5.0 and newer.

To create the client with this engine, pass it to the HttpClient constructor:

val client = HttpClient(OkHttp)

To configure the engine, pass settings exposed by OkHttpConfig to the engine method:

val client = HttpClient(OkHttp) {
engine {
// this: OkHttpConfig
}
}

You can learn more about client engines from Engines.

Functions

Link copied to clipboard
open override fun create(block: OkHttpConfig.() -> Unit): HttpClientEngine