5 concepts · 10 practice questions
Retrofit turns an annotated interface into HTTP calls and supports suspend functions directly. OkHttp underneath handles connection pooling, caching, timeouts and interceptors. Share one OkHttpClient: each instance has its own pool and threads.
interface Api {
@GET("users/{id}")
suspend fun user(@Path("id") id: String): UserDto
}
Sign in to read the rest and take the 10-question test.
Sign in to continue