https://kotlinlang.org logo
Title
t

Tobias

06/24/2020, 12:40 PM
Is there any good framework (similar to jersey-client or retrofit) for doing rest calls with annotated interfaces in a node-js context?
It seems to be a common question in this channel, but all the answers seems to be for the JVM.
s

spand

06/24/2020, 1:09 PM
Afaik the ktor client is multiplatform
t

Tobias

06/24/2020, 2:46 PM
yes, but what I'm looking for is something that eats annotated interfaces and spits clients that you just call methods on, e.g.
public interface GitHubService {
  @GET("users/{user}/repos")
  suspend fun listRepos(@Path("user") user: String): List<Repo>
}
It's synthetic sugar, but does a LOT for readability imho
👆 1
h

Hyun

01/02/2021, 2:35 PM
https://github.com/dss99911/kotlin-simple-architecture/tree/master/api May I share this library? It's similar to retrofit on MP