Java

A JVM client engine that uses the Java HTTP Client introduced in Java 11.

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

val client = HttpClient(Java)

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

val client = HttpClient(Java) {
engine {
// this: JavaHttpConfig
}
}

You can learn more about client engines from Engines.

Functions

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