Package-level declarations

Properties

Link copied to clipboard
var httpClientCustomizer: ERROR CLASS: Symbol not found for HttpClientConfig<ERROR CLASS: Symbol not found for OkHttpConfig>.() -> Unit?

Optional global hook letting platform code customize the OkHttp engine before DefaultHttpClient builds its client (e.g. tutorial apps installing permissive SSL on outdated JDKs, or production apps wiring a corporate proxy / custom truststore). Applied before any caller-supplied config so callers can still override.

Functions

Link copied to clipboard
expect fun DefaultHttpClient(connectTimeout: Long = 3000, requestTimeout: Long = 30000, config: HttpClientConfig<*>.() -> Unit = {}): HttpClient

Returns a platform-configured Ktor HttpClient. JVM and Android use OkHttp; JS uses the Ktor JS engine. Apps can install per-platform engine config (custom SSL, proxies) via the platform-side httpClientCustomizer hook.

actual fun DefaultHttpClient(connectTimeout: Long, requestTimeout: Long, config: HttpClientConfig<*>.() -> Unit): HttpClient

Returns a platform-configured Ktor HttpClient. JVM and Android use OkHttp; JS uses the Ktor JS engine. Apps can install per-platform engine config (custom SSL, proxies) via the platform-side httpClientCustomizer hook.

actual fun DefaultHttpClient(connectTimeout: Long, requestTimeout: Long, config: ERROR CLASS: Symbol not found for HttpClientConfig<*>.() -> Unit): ERROR CLASS: Unresolved name: HttpClient
actual fun DefaultHttpClient(connectTimeout: Long, requestTimeout: Long, config: HttpClientConfig<*>.() -> Unit): HttpClient

Returns a platform-configured Ktor HttpClient. JVM and Android use OkHttp; JS uses the Ktor JS engine. Apps can install per-platform engine config (custom SSL, proxies) via the platform-side httpClientCustomizer hook.