Patrick
02/11/2020, 9:06 AMval client = HttpClient(Curl) {
install(JsonFeature) {
serializer = KotlinxSerializer()
}
}
val response = client.get<String>("<https://google.com>")
println(response)
This code works fine on MacOS, but fails on windows with this error message:
Uncaught Kotlin exception: io.ktor.client.engine.curl.CurlIllegalStateException: Connection failed for request: CurlRequestData(url='<https://google.com/>', method='GET', content: 0 bytes)
at kfun:kotlin.Throwable.<init>(kotlin.String?;kotlin.Throwable?)kotlin.Throwable (000000000045bbc0)
at kfun:kotlin.Throwable.<init>(kotlin.String?)kotlin.Throwable (000000000045beb0)
at kfun:kotlin.Exception.<init>(kotlin.String?)kotlin.Exception (0000000000455160)
at kfun:kotlin.RuntimeException.<init>(kotlin.String?)kotlin.RuntimeException (0000000000454ca0)
at kfun:kotlin.IllegalStateException.<init>(kotlin.String?)kotlin.IllegalStateException (0000000000455330)
at kfun:io.ktor.client.engine.curl.CurlIllegalStateException.<init>(kotlin.String)io.ktor.client.engine.curl.CurlIllegalStateException (00000000006d72d0)
at kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler.readResponseDataFromEasyHandle#internal (00000000006ded80)
at kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler.collectCompleted#internal (00000000006de290)
at kfun:io.ktor.client.engine.curl.internal.CurlMultiApiHandler.pollCompleted(<http://kotlin.Int|kotlin.Int>)kotlin.collections.List<io.ktor.client.engine.curl.internal.CurlResponseData> (00000000006dd400)
at kfun:io.ktor.client.engine.curl.pollCompleted$ktor-client-curl()kotlin.collections.List<io.ktor.client.engine.curl.internal.CurlResponseData> (00000000006d9cc0)
at kfun:io.ktor.client.engine.curl.CurlProcessor.poll$lambda-6#internal (00000000006d94f0)
at _ZN6Worker19processQueueElementEb (00000000008900c0)
at _ZN12_GLOBAL__N_113workerRoutineEPv (00000000008915e0)
at pthread_create_wrapper (00000000008c1850)
at (00007ffdcfd2b02c)
at (00007ffdcfd2b0a0)
at (00007ffdd04c7bc0)
at (00007ffdd0f0ceb0)
Does anyone have an idea why this does not work?msink
02/11/2020, 9:08 AMhttp://
?Patrick
02/11/2020, 9:19 AMmsink
02/11/2020, 9:23 AMPatrick
02/11/2020, 9:24 AMmsink
02/11/2020, 9:41 AM.exe
- ../ssl/certs
Patrick
02/11/2020, 9:41 AMmsink
02/11/2020, 9:43 AMPatrick
02/11/2020, 9:44 AM