mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
18 lines
399 B
Kotlin
18 lines
399 B
Kotlin
package ru.fromchat.api
|
|
|
|
import io.ktor.client.HttpClient
|
|
import io.ktor.client.HttpClientConfig
|
|
import io.ktor.client.engine.okhttp.OkHttp
|
|
import okhttp3.Dns
|
|
|
|
actual fun createPlatformHttpClient(block: HttpClientConfig<*>.() -> Unit): HttpClient {
|
|
return HttpClient(OkHttp) {
|
|
engine {
|
|
config {
|
|
dns(Dns.SYSTEM)
|
|
}
|
|
}
|
|
block()
|
|
}
|
|
}
|