Retrofit can't be used in Compose Desktop? i see t...
# compose-desktop
p
Retrofit can't be used in Compose Desktop? i see that people is talking of some library called Ktorfit, but can't find any info about retrofit working on it. Not available? Which is the best alternative?
j
Retrofit works fine for Compose UI for Desktop
p
Can you send me a link with info about how to implement it? can't find it
j
That is about Kotlin multiplatform
Compose UI for Desktop is not Kotlin multiplatform it's Kotlin oneplatform and that platform is the JVM, the platform Retrofit has supported since its inception
u
Use this
p
Hi Elie, why you prefeer ktorfit if retrofit is compatible with compose desktop?
u
Personally I have gotten into the habit of trying to use only kmp libraries, because even if for the moment I am only developing my app for Android, if Tomorrow wants to port it to iOS it will be much simpler.
after personally I use Ktor and not ktorfit, because even if it is different from retrofit, I find it more complete and above all it is directly supported by jetbrains
p
can ktor transform an XML response from a server easily to kotlin data classes? I'm having a lot of issues doing it with retrofit, in fact I'm two days stuck with that