How to create a call adapter for suspending functions in Retrofit?
问题 I need to create a retrofit call adapter which can handle such network calls: @GET("user") suspend fun getUser(): MyResponseWrapper<User> I want it to work with Kotlin Coroutines without using Deferred . I have already have a successful implementation using Deferred , which can handle methods such as: @GET("user") fun getUser(): Deferred<MyResponseWrapper<User>> But I want the ability make the function a suspending function and remove the Deferred wrapper. With suspending functions, Retrofit