Hi, I've tried to debug this situation but I've be...
# ktor
a
Hi, I've tried to debug this situation but I've been unable to:
Copy code
val dnb = "<https://www.dnb.com/apps/dnb/servlets/CompanySearchServlet>"
val res = client.get(dnb) {
    url {
        parameters.append("pageNumber", "1")
        parameters.append("pageSize", "5")
        parameters.append("searchTerm", "NQB8 Limited")
        parameters.append(
            "token",
            "eyJwNCI6IklvTEh3WVN6SkZTaDJLUG0zYU41c1NacnZLUFBNUE1MTlBSTE1RIiwicDIiOjksInAzIjozOCwicDEiOjE2NjM2MzI0NjgyMzd9"
        )
    }
}
println(res)
It works on postman, but it kinda freezes on Ktor with no response.
My configuration:
Copy code
val client: HttpClient by lazy {
    HttpClient(CIO){
        install(ContentNegotiation){
            json(Json {
                prettyPrint = true
                isLenient = true
                ignoreUnknownKeys = true
            })
        }
        install(Logging)
        followRedirects = true
        expectSuccess = false
        engine {
            requestTimeout = 30000
        }
    }
}
a
As I can see, this server supports only HTTP/2 but CIO engine doesn’t. To solve you problem please use the
OkHttp
engine.
a
Oh okay thanks.