Top "Retrofit" questions

Retrofit is a type-safe REST client for Android and Java by Square, Inc.

Dagger 2 injecting multiple instances of same object type

Background I am converting my app to MVP architecture and found Dagger 2 to be useful to inject dependencies when needed. …

android retrofit dagger-2
Perform requests with Retrofit inside custom Runnable

I am migrating from Volley to a custom implementation using Retrofit, but I'm trying to add to my implementation some …

android threadpoolexecutor retrofit
Is it possible to show progress bar when download via Retrofit 2 Asynchronous?

@Streaming @GET Call<ResponseBody> downloadSong(@Url String url); Above code is used to download file asynchronously using retrofit. …

android download retrofit retrofit2 progress
Okhttp refresh expired token when multiple requests are sent to the server

I have a ViewPager and three webservice calls are made when ViewPager is loaded simultaneously. When first one returns 401, Authenticator …

java android http retrofit okhttp
Mock Retrofit Observable<T> response in Android Unit tests

I have an API interface and I'm testing a View that involves network calls. @Config(emulateSdk = 18) public class SampleViewTest extends …

android unit-testing mockito robolectric retrofit
Kotlin Android Retrofit 2.6.0 with coroutines error handling

I am using Retrofit 2.6.0 with coroutines for my web service call. I am getting the API response properly with all …

android kotlin retrofit retrofit2
Retrofit ETAG and Caching

Is there a proper explanation on how to add caching and ETAG/If-None-Match support to Retrofit+OkHttp? I'm struggling to …

android retrofit okhttp etag
Retrofit 2 download image and save to folder

I need to download image from server and save it to folder, so I am using Retrofit 2. Problem is that …

android retrofit android-bitmap retrofit2
What is the use case for doOnSuccess vs onSuccess in rxJava

I'm confusing about use case for doOnSuccess in rxJava. Let's see the code: Case 1: networkApi.callSomething() .subscribeOn(Schedulers.io()) .observeOn(…

android retrofit rx-java rx-kotlin
Fatal Exception: java.lang.NullPointerException in release build

I am facing a weird issue in the release build of the app. Here's my exception Fatal Exception: java.lang.…

android kotlin gson retrofit android-r8