16 lines
696 B
Kotlin
16 lines
696 B
Kotlin
package dev.inmo.tgbotapi.bot.ktor.base
|
|
|
|
import io.ktor.client.*
|
|
|
|
/**
|
|
* This function is used in default constructor of [MultipleClientKtorRequestsExecutor] and on all non-native
|
|
* platforms should return [HttpClient.config] call
|
|
*
|
|
* On LinuxX64 it will create copy with Curl engine or throw an exception if engine is different with Curl
|
|
* On MingwX64 it will create copy with WinHttp engine or throw an exception if engine is different with WinHttp
|
|
*
|
|
* @throws IllegalArgumentException When pass non Curl-based [HttpClient] on LinuxX64 or non WinHttp-based [HttpClient]
|
|
* on MingwX64
|
|
*/
|
|
internal actual inline fun platformClientCopy(client: HttpClient): HttpClient = client.config { }
|