Top "Retrofit2" questions

Retrofit2 is the second version of the type-safe REST client Retrofit for Android and Java.

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
Retrofit2 java.lang.NoClassDefFoundError: okhttp3/Call$Factory in JAVA

I am not developing a Android Application , I'm just writing some JAVA codes to support Imgur API services. public interface …

java rest retrofit2 okhttp3 imgur
Retrofit2 + RxJava2 + RxAndroid error

I am getting error message as below when try to crate Subscriber and subscribe. can not resolve method 'subscribe(anonymous …

java android retrofit2 rx-android rx-java2
how to use retrofit 2 to send file and other params together

I am looking for an example how could I send file and other params together to server. I have to …

android retrofit retrofit2 android-networking
Coroutines and Retrofit, best way to handle Errors

After reading this issue How to deal with exception and this Medium Android Networking in 2019 — Retrofit with Kotlin’s Coroutines …

android kotlin retrofit2 kotlin-coroutines kotlin-android-extensions
How can I verify the content of a POST Body with MockWebServer?

I have several unit tests that use Squares OkHttps MockWebServer. The tests run all fine, and everything works very well. …

junit junit4 okhttp retrofit2 mockwebserver
Retrofit: Redirect to LoginActivity if response code is 401

How to start LoginActivity from the interceptor(non-activity class)? I have tried the code (Interceptor) below but not working for …

java android retrofit retrofit2 okhttp
Best way to wait for retrofit2 to finish before continuing async

I realize similar questions have been asked but I am new to android and find the answers a bit confusing …

android asynchronous runnable retrofit2 countdownlatch
Moshi Expected BEGIN_OBJECT but was BEGIN_ARRAY - custom converter ignored

I'm using Moshi as converter for Retrofit, but for one particular request it doesn't work and exception is thrown: com.…

java json retrofit2 moshi
java.lang.IllegalArgumentException: @Url cannot be used with @GET URL (parameter #1)

@GET("user/token/") Observable<String> gToken(@Url String url, @Query("usertype") int userType); I get the following error: …

java url get retrofit2