Top "Retrofit" questions

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

Retrofit 2: Catch connection timeout exception

I have the following setup: final OkHttpClient okHttpClient = new OkHttpClient(); okHttpClient.setReadTimeout(5, TimeUnit.SECONDS); okHttpClient.setConnectTimeout(5, TimeUnit.SECONDS); RestAdapter.Builder …

android retrofit connection-timeout okhttp
How to retry HTTP requests with OkHttp/Retrofit?

I am using Retrofit/OkHttp (1.6) in my Android project. I don't find any request retry mechanism built-in to either of …

android retrofit okhttp
Does OkHttp support accepting self-signed SSL certs?

I'm working for a customer who has a server with self-signed SSL cert. I'm using Retrofit + CustomClient using wrapped OkHttp …

java retrofit okhttp
Android Retrofit Parameterized @Headers

I am using OAuth and I need to put the OAuth token in my header every time I make a …

java android annotations retrofit
Retrofit Expected BEGIN_OBJECT but was BEGIN_ARRAY

I'm fairly new to JSON parsing, I'm using the Retrofit library of Square and ran into this problem. I'm trying …

java android json gson retrofit
Retrofit callback get response body

I am testing Retrofit to compare it with Volley and I am struggling to get the response from my requests. …

android retrofit
Retrofit GSON serialize Date from json string into java.util.date

I am using the Retrofit library for my REST calls. Most of what I have done has been smooth as …

java android json gson retrofit
Retrofit-2 Content-Type Issue

My Api is accepting Content-Type application/json as headers. I set Header perfectly as mentioned in Retrofit Docs. @Headers("Content-Type: …

android retrofit retrofit2
How to use interceptor to add Headers in Retrofit 2.0?

Our team decide to adopt Retrofit 2.0 and I'm doing some initial research on it. I'm a newbie to this library. …

java android retrofit
How to get Retrofit success response status codes

I am not able to get success response status code from response like 200,201.. etc. As we can easily get error …

android retrofit retrofit2