From 450323e9075ba03a569691dbbfca524f35596bdc Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Wed, 20 Mar 2024 21:57:22 +0100 Subject: [PATCH] Revert "Switch to OkHttp as http client on jvm" This reverts commit 00530794ba1c5ab23d9e24bdeecd37dffe0e1ce0. --- common/build.gradle.kts | 2 +- common/src/jvmMain/kotlin/http/HttpEngine.kt | 4 ++-- gradle/libs.versions.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 17a47430f5a..d702180bf1a 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -22,7 +22,7 @@ kotlin { } jvmMain { dependencies { - api(libs.ktor.client.okhttp) + api(libs.ktor.client.cio) } } nonJvmMain { diff --git a/common/src/jvmMain/kotlin/http/HttpEngine.kt b/common/src/jvmMain/kotlin/http/HttpEngine.kt index baaaf35bb58..0d73e596c9b 100644 --- a/common/src/jvmMain/kotlin/http/HttpEngine.kt +++ b/common/src/jvmMain/kotlin/http/HttpEngine.kt @@ -2,8 +2,8 @@ package dev.kord.common.http import dev.kord.common.annotation.KordInternal import io.ktor.client.engine.* -import io.ktor.client.engine.okhttp.OkHttp +import io.ktor.client.engine.cio.* /** @suppress */ @KordInternal -public actual fun httpEngine(): HttpClientEngineFactory = OkHttp +public actual fun httpEngine(): HttpClientEngineFactory = CIO diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 157af8f7bf1..7265e95e093 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -48,7 +48,7 @@ ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" } ktor-client-winhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "ktor" } ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" } ktor-client-curl = { module = "io.ktor:ktor-client-curl", version.ref = "ktor" } -ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } +ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } ktor-client-websockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" } ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" } ktor-network = { module = "io.ktor:ktor-network", version.ref = "ktor" }