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

Sergio Casero

10/23/2018, 5:49 PM
Hello! Is there any way to debug the ktor client calls?
👍 1
d

Deactivated User

10/24/2018, 2:43 AM
What kind of debugging do you need?
Depending on what you need, maybe MockEngine would work
s

Sergio Casero

10/24/2018, 6:23 AM
Only need to print the http request code completely
But I've already found the issue 🙂
d

Deactivated User

10/24/2018, 6:26 AM
you can create a MockEngine that redirects to another HttpClient and prints request and response. But no builtin functionality afaik
c

coletz

10/24/2018, 6:36 AM
mock engine is only available on jvm, so no way to do something for ios?
d

Deactivated User

10/24/2018, 6:37 AM
MockEngine is < 100 LoC. I guess for now you can just copy them to your own common code
Eventually that will go to common code probably and will be supported on all the targets
c

coletz

10/24/2018, 6:46 AM
hadn't checked it, thanks!
3 Views