Why is ktor not able to parse the res to a data cl...
# ktor
g
Why is ktor not able to parse the res to a data class? I have the contentNegotiation plugin installed
Copy code
client = HttpClient(CIO) {
            install(ContentNegotiation) {
                jackson()
            }
        }
g
Because it returns HttpResponse and should use .body() to convert it to required type
3
Ktor 1.x had all those top level methods like get/post/etc which return generic types, not anymore, all methods in Ktor 2.0 return now HttpRequest and you return required representation
g
Ah damn didn't scroll enough in the code sry haha
😄 1
Thank you a lot