Top "Retrofit2" questions

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

POST Multipart Form Data using Retrofit 2.0 including image

I am trying to do a HTTP POST to server using Retrofit 2.0 MediaType MEDIA_TYPE_TEXT = MediaType.parse("text/plain"); …

android retrofit androidhttpclient retrofit2
Retrofit 2: Get JSON from Response body

I want to get string json from my api using retrofit 2, I have no problem when using retrofit 1 to get …

android json retrofit retrofit2
Logging with Retrofit 2

I'm trying to get the exact JSON that is being sent in the request. Here is my code: OkHttpClient client = …

java retrofit retrofit2 okhttp3
Retrofit 2.0 how to get deserialised error response.body

I'm using Retrofit 2.0.0-beta1. In tests i have an alternate scenario and expect error HTTP 400 I would like to have …

java retrofit retrofit2
No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator

I am trying to consume an API using Retrofit and Jackson to deserialize. I am getting the onFailure error No …

android kotlin jackson retrofit2
How to log request and response body with Retrofit-Android?

I can't find relevant methods in the Retrofit API for logging complete request/response bodies. I was expecting some help …

android logging retrofit retrofit2
Retrofit 2 - URL Query Parameter

I am using a query parameters to set the values needed by the Google Maps API. The issue is I …

java android retrofit retrofit2
How to Upload Image file in Retrofit 2

I have an image of postman like below. How to do the same thing in Retrofit 2. I've declared the interface …

android retrofit2
Retrofit2 Android: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $

I know this is not the first time someone asking about this problem but with Retrofit2 I can't find the …

java android json retrofit retrofit2
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