Retrofit
Type-safe HTTP client.
What is Retrofit
Retrofit turns a Kotlin interface into a working HTTP client using annotations.
Install
implementation("com.squareup.retrofit2:retrofit:2.11.0")Usage
interface Api {
@GET("users/{id}")
suspend fun user(@Path("id") id: Int): User
}Docs
Official documentation: Retrofit.