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
{
"...
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
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
...
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
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
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 ...
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",
"...
1
vote
1
answer
79
views
How to filter specific items from a list after calling an API using Retrofit?
I am calling an API of cricapi.com and display it using Retrofit. It displays a list of current matches. I want to only display the Indian Premier League matches from the api result.
This is the API ...
0
votes
1
answer
784
views
How to wait for Retrofit call function to end completely before running next function?
In my jetpack compose app I'm retrieving data from API with retrofit. The problem is that the viewModel.updateFlightSearch function is being run just after the getLocation function, and the viewModel....
0
votes
0
answers
53
views
I Can't request a @Put in my android app with Retrofit
i'm trying to call a RestWebService using Retrofit, i can do the @get method but when i try the @PUT i don't have a response. My Restservice use x-www-form.
I try do use Logger but when the rest ...
1
vote
1
answer
10k
views
How to make a correct POST request with Retrofit in Kotlin?
I would like to post this json:
{
"user": {
"name": "Mike",
"age": "26",
}
}
but when I use ...
0
votes
1
answer
837
views
How to close a connection with Retrofit, okhttp with Kotlin
after a Post request everything works fine!
On my NodeJS Express Server the request is recieved.
But after a few seconds the app is crashing with this error:
FATAL EXCEPTION: DefaultDispatcher-worker-...