As of today I'm using Retroft in combination with Moshi for Serialization and Arrow's Either API for return type specifications, for instance suspended network calls return something like Either<CallError, Dto> where CallError is an Arrow API.
I'm slowly migrating my app to be multiplatform capable, so I'm replacing APIs like java.time.* with kotlinx.datetime.* and so on. My problem is, there's a Retrofit integration with Arrow but not an equivalent for Ktor as far as I know.
So my question is: what would be the best pattern or strategy to replace Retrofit with Ktor client so that my client code doesn't break? This is kind of tricky since CallError is located in arrow.retrofit.adapter.either.networkhandling, so it's part of Retrofit's integration API...
For clarification: I'm also migrating from Moshi to kotlinx.serialization, maybe this helps somehow.
As of today I'm using Retroft in combination with Moshi for Serialization and Arrow's Either API for return type specifications, for instance suspended network calls return something like
Either<CallError, Dto>whereCallErroris an Arrow API.I'm slowly migrating my app to be multiplatform capable, so I'm replacing APIs like java.time.* with kotlinx.datetime.* and so on. My problem is, there's a Retrofit integration with Arrow but not an equivalent for Ktor as far as I know.
So my question is: what would be the best pattern or strategy to replace Retrofit with Ktor client so that my client code doesn't break? This is kind of tricky since
CallErroris located inarrow.retrofit.adapter.either.networkhandling, so it's part of Retrofit's integration API...For clarification: I'm also migrating from Moshi to kotlinx.serialization, maybe this helps somehow.