Top "Retrofit2" questions

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

SocketTimeoutException android retrofit

I am building a restful client using retrofit in my android app, however i am struggling with an exception while …

android retrofit2 okhttp socket-timeout-exception
RXJava2: correct pattern to chain retrofit requests

I am relatively new to RXJava in general (really only started using it with RXJava2), and most documentation I can …

java android rx-java retrofit2 rx-java2
Moshi Retrofit error: "Expected a string but was BEGIN_OBJECT"

I built my Retrofit instance like this: Retrofit retrofit = new Retrofit.Builder() .baseUrl(server.url("/")) .addConverterFactory(MoshiConverterFactory.create(moshi)) .build(); …

android retrofit2 mockwebserver moshi
NonExistentClass cannot be converted to Annotation

I added a new Retrofit interface to my project containing a couple of Endpoints annotated with the @GET and @HEADERS …

android retrofit2 dagger-2 kapt
Android Retrofit 2 multiple converters (Gson & SimpleXML) error

In my project (I am using Dagger 2, Retrofit 2 & OkHTTP, RxAndroid) i have 2 different API calls. From one I receive …

android gson retrofit2 dagger-2 simple-xml-converter
Retrofit 2.x : Log Header for request and response

I am using retrofit 2.x and i want to log the header and body of request and response . HttpLoggingInterceptor interceptor = …

android retrofit android-networking retrofit2
How to resolve java.lang.AssertionError when creating OkHttpClient in mockito?

I'm trying to make some canned network respones. I have the json response for the actual request and I have …

android junit mockito okhttp retrofit2
Cannot POST multipart data from retrofit 2

I have to send a post request in this format. --__X_PAW_BOUNDARY__ Content-Disposition: form-data; name="user_photo[image]"; …

android retrofit multipartform-data multipart retrofit2
Retrofit2 + SimpleXML in Kotlin: MethodException: Annotation must mark a set or get method

I want to fetch XML data from API and map it to Kotlin model object by using Retrofit2 + SimpleXML in …

android kotlin simple-framework retrofit2
Detect if OkHttp response comes from cache (with Retrofit)

Is there a way to detect if a Retrofit response comes from the configured OkHttp cache or is a live …

android retrofit2 okhttp okhttp3