All Questions
332
questions
0
votes
2
answers
53
views
How to parse API JSON response that contains 1 list of multiple (2 in my case) types of objects in Android, I'm using Retrofit for API call
'So I searched enough, there isn't any question like this im sure. And I'm wondering how can this be not a questions others have come across or am I soo noob?
So the API response is as follow
{
"...
201
votes
20
answers
188k
views
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 ...
1
vote
3
answers
1k
views
My Retrofit call.enque() method is getting skipped over entirely, not sure why
I'm making a call using Retrofit's enqueue() method. I'm calling my refreshImages() in my MainActivity's onCreate(), refreshImages() then calls a method refreshImagesIds() which is supposed to make a ...
0
votes
1
answer
40
views
Sending enum via PUT method, Retrofit | Error 400
I want to send enum class to API via Retrofit. For parsing I'm using Gson.
Enum class that I'm sending:
enum class TaskState {
NOT_ASSIGNED,
IN_PROGRESS,
CLOSED,
DELETED }
My Retrofit method:
@PUT(&...
0
votes
0
answers
44
views
Adding GSONConvertorFactory to retrofit2 while calling an API
I have many API's which I am calling from my application.
On response I have default GsonConvertorFactory which converts the JSON response to the corresponding Java objects with exact number and name ...
0
votes
1
answer
259
views
How can I handle token saving in header using interceptor flutter?
have a Dart project using the Injectable package for dependency injection. I'm facing a circular dependency issue between three classes: TokenInterceptor, AuthRepository, and ApiDatasource, which ...
0
votes
1
answer
41
views
ERROR = Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
I have API:
import com.poklad.androidtestprojectny.data.remote.model.ResponseCategory
import com.poklad.androidtestprojectny.utils.ApiConstants
import retrofit2.http.GET
import retrofit2.http.Query
...
356
votes
28
answers
529k
views
How to POST raw whole JSON in the body of a Retrofit request?
This question may have been asked before but no it was not definitively answered. How exactly does one post raw whole JSON inside the body of a Retrofit request?
See similar question here. Or is this ...
0
votes
1
answer
32
views
Kotlin - Can not send query data to service correctly
I am trying build an app using Coin Gecko API. I am using specific service called /api/v3/coins/{id}. For example, the id of the BTC coin is "bitcoin". So the request should be something ...
0
votes
1
answer
178
views
Can't make a Get request using Retrofit
I am learning Retrofit and ran into an error while trying to get data with a Get request.
Here are all the files:
main.dart
...
// build list view & manage states
FutureBuilder<List<...
0
votes
2
answers
226
views
Retrofit Square Brackets Query Parameters
I have the following GET URL that requires multiple parameters:
https://www.games.com/game?filter[condition][path]=season&filter[condition][value]=Season1&page[limit]=1&page[offset]=0
...
0
votes
0
answers
58
views
API is not working Android Kotlin retrofit API for Mobile recharge
There is a API which running in post request. this code is not working:
PHP API query:
query('select mt.translationID,mt.mobile,mt.amount, mt.operatorCodeTimestamp as rechargedate, mt.status from ...
20
votes
3
answers
12k
views
How to pass custom enum in @Query via Retrofit?
I have a simple enum:
public enum Season {
@SerializedName("0")
AUTUMN,
@SerializedName("1")
SPRING;
}
Starting some version, GSON became able to parse such enums. To make sure, I ...
1
vote
0
answers
264
views
How to fix error 'The request is missing a valid API key' in Kotlin Retrofit for Google Translation API?
I use retrofit and Rapid api to use Google translation api but i have an error:
{
"code" : 403,
"errors" : [{
"domain" : "global",
"...
7
votes
4
answers
7k
views
Use Retrofit to consume Server Sent Events
I am trying to consume a rest api [1] that sends server sent events to the client.
I am currently using retrofit from square to consume this but I am not sure how to do it.
Can some one who has prior ...