What are the differences between HttpClient(CIO) and HttpClient(OkHttp) with regards to ktor-client not server? Thanks
c
christophsturm
03/06/2022, 7:06 PM
I always use`CIO` and if when i find that it acts strange I use
Java
instead. usually it then acts the same, and i i find the bug and go back to CIO
a
Aleksei Tirman [JB]
03/07/2022, 8:05 AM
The difference is in the underlying implementation. The CIO engine is written by the Ktor team and the OkHttp engine uses the OkHttp HTTP client.
b
Barry Fawthrop
03/07/2022, 11:23 PM
Alesksei, thanks can you elaborate on what one might experience as a difference between them? say performance or json serialization? Thanks again
a
Aleksei Tirman [JB]
03/08/2022, 3:28 PM
The CIO engine uses coroutines and easier to debug than other engines. It's recommended for the development usage only. The benefit of the OkHttp engine is that it works on Android 2.3 and above.