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

Orhan Tozan

04/24/2020, 12:20 PM
Of all the engines for JVM/Android for HTTP Client, which one is recommended?: Apache, CIO, Jetty, OkHttp, HttpUrlConnection?
e

e5l

04/24/2020, 12:21 PM
Hi @Orhan Tozan, for client or server?
o

Orhan Tozan

04/24/2020, 12:21 PM
For client*
e

e5l

04/24/2020, 12:22 PM
What version of android are you targeting?
o

Orhan Tozan

04/24/2020, 12:22 PM
min21+, target 29
e

e5l

04/24/2020, 12:24 PM
Android , OkHttp and CIO works fine. First 2 has several restrictions about post-get with body. In other cases you will not see the difference.
g

gabin

04/24/2020, 12:24 PM
Android engine is fine
👍 2
o

Orhan Tozan

04/24/2020, 12:27 PM
My networking module is targeting jvm(), which will be used by the main android app, is it fine if I use CIO then instead?
Reading that CIO is ktor's implementation, will this be the recommended engine in the future?
e

e5l

04/24/2020, 12:30 PM
Yep. CIO engine has the same implementation on all platforms
d

Dariusz Kuc

04/24/2020, 2:25 PM
just wondering, is CIO engine behaving similar to Spring WebClient in that it doesn’t block the threads or is it more of a Retrofit model where it is backed by some blocking threadpool?
r

russhwolf

04/24/2020, 2:50 PM
Wait is CIO multiplatform? I thought it was just JVM. Or is that planned to change?
d

Dominaezzz

04/24/2020, 2:54 PM
Planned to change.
e

e5l

04/24/2020, 2:55 PM
@Dariusz Kuc, CIO is non-blocking(except domain name resolution)
👍 1
d

Dariusz Kuc

04/24/2020, 2:56 PM
awesome