František Jeřábek
08/31/2022, 5:44 PMUncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
The code looks like this
import io.ktor.client.*
import io.ktor.client.engine.cio.*
fun main() {
val client = HttpClient(CIO)
}
This is just a simple new instance. I think it should work but it does not 😐. Just in case it is important i am on linuxX64
with dependencies
implementation("io.ktor:ktor-client-core:2.1.0")
implementation("io.ktor:ktor-client-cio:2.1.0")
hfhbd
08/31/2022, 5:48 PMFrantišek Jeřábek
08/31/2022, 5:50 PMgetting started with ktor client
. So i guess i should do that