Is there a KMM library similar to Retrofit or is u...
# multiplatform
m
Is there a KMM library similar to Retrofit or is using just Ktor the best bet?
m
OkHttp has some multiplatform in the 5.0 SNAPSHOTs. Not sure what the status is though
o
I'd recommend trying Ktor first. Good functionality, easy to use, well documented and – as you might see in #ktor – very well supported. In contrast to some other libraries out there, it's really idiomatic Kotlin, not Java rewritten in Kotlin. Also has a reasonable API surface with good possibilities of combining stuff, contrasting with bloated "I'll try to be everything" APIs.
y
OkHttp 5.0 has only enough to support Call.Factory. Unblocking libraries using it as an abstraction. Think Request, Response, HttpUrl (eventually). Expect the best Http lib on each platform to provide the implementation, with a small integration lib. So use Ktor.
r
m
Thanks, that looks good. I will do my PoC with Ktor first but will definitely try out Ktorfit later.
s
I'm using Ktor and I love it, no issues at all
m
Yeah I don't expect any issues with Ktor, I just like how you can describe your API with annotations using Retrofit
1038 Views