Skip to content

Instantly share code, notes, and snippets.

@GauravChaddha1996
Created January 30, 2021 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GauravChaddha1996/756017f0e90169aa1e342e9310c224f4 to your computer and use it in GitHub Desktop.
Save GauravChaddha1996/756017f0e90169aa1e342e9310c224f4 to your computer and use it in GitHub Desktop.
interface SomeApiService {
@GET("some_end_point")
fun getApiEndpointData(@QueryMap map:Map<String,String>): Call<ApiData>
}
launch(coroutineExceptionHandler) {
val service = RetrofitHelper.createRetrofitService(SomeApiService::class.java)
val response = service.getApiEndpointData()
// Use the response here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment