diff --git a/lib/build.gradle b/lib/build.gradle index 3e18f56..01805a1 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -47,7 +47,7 @@ dependencies { implementation 'com.google.android.material:material:1.4.0' // HTTP Client implementation "io.ktor:ktor-client-core:$ktor_version" - implementation "io.ktor:ktor-client-cio:$ktor_version" + implementation "io.ktor:ktor-client-okhttp:$ktor_version" // HTTP Serialization implementation "io.ktor:ktor-client-serialization:$ktor_version" implementation "io.ktor:ktor-client-content-negotiation:$ktor_version" diff --git a/lib/src/main/java/com/telemetrydeck/sdk/TelemetryClient.kt b/lib/src/main/java/com/telemetrydeck/sdk/TelemetryClient.kt index 04b1f2e..87d53c7 100644 --- a/lib/src/main/java/com/telemetrydeck/sdk/TelemetryClient.kt +++ b/lib/src/main/java/com/telemetrydeck/sdk/TelemetryClient.kt @@ -1,7 +1,7 @@ package com.telemetrydeck.sdk import io.ktor.client.* -import io.ktor.client.engine.cio.* +import io.ktor.client.engine.okhttp.* import io.ktor.client.plugins.DefaultRequest import io.ktor.client.plugins.contentnegotiation.ContentNegotiation import io.ktor.client.plugins.logging.DEFAULT @@ -18,7 +18,7 @@ import java.util.* * The HTTP client to communicate with TelemetryDeck's API */ internal class TelemetryClient(private val telemetryAppID: UUID, private val apiBaseURL: URL, private val showDebugLogs: Boolean, private val debugLogger: DebugLogger?) { - private val client: HttpClient = HttpClient(CIO) { + private val client: HttpClient = HttpClient(OkHttp) { install(ContentNegotiation) { json() }