KenworkHttpClient
object KenworkHttpClient
Shared KMP client policy. Products provide the platform engine and own request semantics.
Every client built here gets the same policy: JSON content negotiation using the supplied Json (default DefaultJson) and redirects disabled unless followRedirects is true. Nothing else is installed — no auth, retry, timeout, or logging (see docs/platforms.md).
Properties
Functions
Link copied to clipboard
fun create(engine: HttpClientEngine, json: Json = DefaultJson, followRedirects: Boolean = false): HttpClient
Builds a client over an existing engine. The engine stays caller-owned: close it yourself once every client using it has finished.
fun <T : HttpClientEngineConfig> create(engineFactory: HttpClientEngineFactory<T>, json: Json = DefaultJson, followRedirects: Boolean = false): HttpClient
Builds a client whose engine is created (and closed with the client) from engineFactory, e.g. OkHttp on Android/JVM or Darwin on iOS.