Top "Retrofit2" questions

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

OkHttpClient throws exception after upgrading to OkHttp3

I'm using following lines of code to add a default header to all of my requests sent using Retrofit2: private …

android retrofit okhttp retrofit2 okhttp3
mocking Retrofit response calls with Call not working

I'm mocking the response of the APIService. Unfortunately it is not working, I have to send back a Call but …

android retrofit2 okhttp3
Unit testing android application with retrofit and rxjava

I have developed an android app that is using retrofit with rxJava, and now I'm trying to set up the …

android mocking mockito rx-java retrofit2
multiple api request using retrofit and rx java

I am new to android and I have a scenario where I want to get get data from multiple api. …

android retrofit retrofit2 rx-java2 rx-android
How to mock services with Retrofit 2.0 and the new MockRetrofit class?

Using Retrofit 1 we used to mock web services and simulate network latency as following: MockRestAdapter mockRestAdapter = MockRestAdapter.from(restAdapter); return …

java rx-java retrofit2
Retrofit 2 synchronous call error handling for 4xx Errors

I'm using a android-priority-jobqueue and I use retrofit to make synchronous calls to my rest api but i'm unsure how …

android error-handling retrofit2 synchronous
Android Retrofit 2, differences between addInterceptor & addNetworkInterceptor for editing responses

I've been trying to implement an interceptor ( OkHttp 3.2 & Retrofit 2 ) for editing the JSON response before is returned as response. …

android interceptor retrofit2 okhttp3
ProtocolException: Expected ':status' header not present

Retrofit network calls fails with a Protocol Exception suddenly in a working app. The app was working till yesterday and …

android retrofit retrofit2 okhttp3 protocolexception
Retrofit 2.2.0 Android API 24 javax.net.ssl.SSLHandshakeException: Handshake failed

I'm using Retrofit 2.2.0 for uploading image to server (using Java). With an Android device (Samsung galaxy S6) API 24 (Build : NRD90…

android retrofit retrofit2 sslhandshakeexception
Upload binary file with retrofit 2 in Android

I want to upload a binary file to the server in Android. I test Api method by postman: And it's …

android retrofit2