mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-05 02:12:40 +00:00
add passing of default engines in HttpClient constructors
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package dev.inmo.tgbotapi.bot.ktor.base
|
||||
|
||||
import dev.inmo.tgbotapi.utils.defaultKtorEngine
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.curl.*
|
||||
|
||||
/**
|
||||
@@ -21,4 +23,8 @@ internal actual inline fun platformClientCopy(client: HttpClient): HttpClient =
|
||||
HttpClient(Curl) {
|
||||
this.plusAssign(config)
|
||||
}
|
||||
} ?: throw IllegalArgumentException("On LinuxX64 TelegramBotAPI currently support only Curl Ktor HttpClient engine")
|
||||
} ?: HttpClient(
|
||||
defaultKtorEngine
|
||||
) {
|
||||
install(client)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user