Retrofit Get Data Object

I have a data like this, and i want get report and criteria data. { “response_code”: 200, “message”: “Your report data has been loaded.”, “data”: { …

MVVM – where should I call for user location?

currently, I’m building an app which will show for the user recent forecast. For make an api call, I have to provide longitude and latitude as parameter. For now, I have written some code about …

I’ve received single item from api

I trying to display temperature values that came from the API response in RecyclerView. The thing is my program constantly display just one, first item. I’m not sure where can be the issue, and I feel …

Spotify PKCE. Error invalid client secret

I need to complete Authorization Code Flow with Proof Key for Code Exchange. In step 4, I get an error 400 – bad request {“error”:”invalid_request”,”error_description”:&…

Android Retrofit Call pass response.body() as paramater for processing

I’m wondering how to pass the response.body() as paramater in order to further process it. Since now i could pass it only to a Toast, or setText of a textView, and it works just fine. But if i try to …

List All Data Using Retrofit/OkHttp With Response List

I have some codes that fetch some data from my API. My question is how can I list all the objects that I fetched before without using this jsonData.get(0), I expect something like jsonData.get(i), so …

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 = new OkHttpClient(); client.interceptors().add(new Interceptor(){ @Override public com….

Unable to create call adapter for class example.Simple

I am using retrofit 2.0.0-beta1 with SimpleXml. I want the retrieve a Simple (XML) resource from a REST service. Marshalling/Unmarshalling the Simple object with SimpleXML works fine. When using this …

How to send byte[] array in retrofit

How do you send byte[] array in retrofit call. I just need to send over byte[]. I get this exception when I have been trying to send a retrofit call. retrofit.RetrofitError:┬áretrofit.converter….

HTTP GET with request body RETROFIT

I am using Retrofit to make api calls in my android application. I have to submit a @Body of JSON @GET(“api/”) void getData(@Body UserPostRequestBody request) I get error message retrofit….