I haven't done Android Dev in a while. I can't fin...
# random
y
I haven't done Android Dev in a while. I can't find consistent answers on this, but what's the "cool and hip" way of doing REST JSON clients in Android nowadays? Is it still retrofit? I especially care about Kotlin-idiomacy
c
If you are thinking about Multiplattform you can try #C0A974TJ9
d
I wouldn't choose anything other than Ktor, personally.
There's also this for the Retro-inclined
1
m
@darkmoon_uk I'm curious, what's your preferred way to create JSON clients with Ktor? From your message I assume you don't use Ktorfit? Do you have a better way?
d
Hey Marcin - reading up I came across kind of dismissive of Ktorfit which wasn't my intention! I don't use Ktorfit personally but that's partly because in my own project I'm owning the full stack so can use a simpler scheme than the broader idea of RESTful, just: JSON POST request body -> JSON POST response body ...this makes things easier to manage than the broader RESTful standard where HTTP URL parameters and headers, and response codes are involved. One of the reasons I do this is to intentionally decouple from HTTP; the request/response bodies could equally be sent over a plain TCP socket later if needed, and JSON encoding could be easily swapped for e.g. CBOR or Protocol-buffers to increase performance once the Dev is done. When you need full RESTful e.g. to interface with existing services then yes I expect Ktorfit becomes one, if not the best choice. I'd still go for something based in Ktor simply because it's the most mature and best supported HTTP client/server library going for Kotlin.