https://kotlinlang.org logo
#ktor
Title
# ktor
a

aeruhxi

04/17/2018, 10:44 AM
Just updated to
0.9.1
. Same error
d

Deactivated User

04/17/2018, 12:35 PM
Tried with 0.9.1 and seems to work. Maybe it is related to imports? Try this snippet including imports:
Copy code
import io.ktor.client.*
import io.ktor.client.engine.apache.*
import io.ktor.client.request.*
import io.ktor.http.*
import java.net.*

suspend fun test() {
    val client = HttpClient(Apache)
    val call = client.request<String> {
        url(URL(“<http://127.0.0.1:8080/“>))
        method = HttpMethod.Get
    }
}