Top "Retrofit" questions

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

Retrofit, callback for 204 No Content response?

On Android, I initially implemented a Retrofit interface like this: @DELETE(USER_API_BASE_URL + "/{id}") public void deleteUser(@Path("…

android retrofit http-status-code-204
How to tell OkHttpClient to ignore cache and force refresh from server?

In my android application, I am using Retrofit with OkHttpClient with caching enabled to access some APIs. Some of our …

android caching retrofit okhttp
How to handle rotation with Retrofit and RxJava/RxAndroid in Activity?

I read here that we can use some global cache in order to handle rotation. You can prevent this by …

android rotation retrofit rx-java rx-android
How to handle pagination in retrofit

I'm building an app using retrofit. Everything's working swimmingly, but I'm worried about the size of my API requests and …

android api-design retrofit okhttp
Observable.empty() causes java.util.NoSuchElementException: Sequence contains no elements

I'm using Retrofit 2.0.0-beta2 with RxJava 1.0.14. I handle errors this way because I need to execute some code in doFinally: .…

java android retrofit rx-java nosuchelementexception
How to create a call adapter for suspending functions in Retrofit?

I need to create a retrofit call adapter which can handle such network calls: @GET("user") suspend fun getUser(): MyResponseWrapper&…

java android kotlin retrofit kotlin-coroutines
Retrofit: How to specify comma-separated parameters in request?

I'm trying to refactor my code to use Retrofit (from Volley) for some Foursquare API calls but haven't found a …

android foursquare retrofit
Multiple converters with Retrofit 2

I have a HATEOAS (HAL) REST service and managed to talk to it with the code below (using halarious as …

java generics gson retrofit hateoas
How cancel task with retrofit and rxjava

I have rest api. @Get("/serveraction") public Observable<String> myRequest(@Query("Data") String data); I know, that okhttp …

retrofit reactive-programming rx-java okhttp
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