Ktor client or Ktorfit for new KM project? #213
-
I'm new to Kotlin Multiplatform as an Android developer and I am used to using Retrofit. If I'm just trying to get simple networking calls made with my KM apps. Trying to understand the difference between this and just a normal Ktor client. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, with Ktorfit you can define your network API based on interfaces and annotations similar to the way Retrofit works. And it can be used with KM Projects. Ktorfit is built on top of Ktor Clients, similar to how Retrofit uses OkHttp. When you want to keep using something similar to Retrofit but in KM Projects, use Ktorfit. When you want to avoid code generation, use just Ktor clients. When you want to try Ktorfit, please take a look at the example projects https://github.com/Foso/Ktorfit/tree/master/example/ |
Beta Was this translation helpful? Give feedback.
Hi, with Ktorfit you can define your network API based on interfaces and annotations similar to the way Retrofit works. And it can be used with KM Projects. Ktorfit is built on top of Ktor Clients, similar to how Retrofit uses OkHttp. When you want to keep using something similar to Retrofit but in KM Projects, use Ktorfit. When you want to avoid code generation, use just Ktor clients.
When you want to try Ktorfit, please take a look at the example projects https://github.com/Foso/Ktorfit/tree/master/example/