Questions tagged [retrofit]
Retrofit is a type-safe REST client for Android and Java by Square, Inc.
retrofit
8,568
questions
0
votes
0
answers
24
views
LiveData is not updating its value on 2nd api call
I am fetching currency exchange rate by api call using retrofit and ViewModel concept.On launch of application I am able to get the latest data from the server but when I am trying to update the live ...
-1
votes
3
answers
45
views
JSON data was not fully consumed
While sending the image with multipart using retrofit library getting this error.
I have checked many solution which are available in Stack Overflow but not any of them work for me.
Here I am ...
-1
votes
0
answers
97
views
Android studio build not building
What could be the reason for Android build error.
Gradle:
classpath 'com.android.tools.build:gradle:7.4.2'
Retrofit dependency:
implementation ('com.squareup.retrofit2:retrofit:2.11.0') {
...
0
votes
0
answers
24
views
Retrofit java.net.ConnectException: Failed to connect to
I faced a problem. Retrofit shows me java.net.ConnectException: Failed to connect to /10.122.3.25:7068.
I also added ACCESS_NETWORK_STATE in manifest file. But problem was not solved.
How can I solve ...
0
votes
1
answer
20
views
How to change Retrofit's base url (that may or may not contain path segments) at runtime?
I know there are ways to change Retrofit's base url at runtime using Interceptors. For example: https://gist.github.com/swankjesse/8571a8207a5815cca1fb
But in the example above, the "base url&...
0
votes
2
answers
37
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
0
answers
26
views
Jackson handle 2 properties with the same name
I'm using retrofit and Jackson to deserialaze XML from body.
The third-party Api returns me xml of the form
<Answer>
<Seance Hall="auditorium">
<Hall>
<...
0
votes
0
answers
19
views
java.net.SocketTimeoutException retrofit
We are using a Retrofit 2.6 client to call a partner server, but for some calls, we are getting a socket connection timeout exception. We also have a Step Functions activity poller implemented within ...
-1
votes
1
answer
66
views
Cannot access class 'retrofit2.Response'. Check your module classpath for missing or conflicting dependencies
I started a project with a few modules and i have problems when i build the app.
Cannot access class 'retrofit2.Response'. Check your module classpath for missing or conflicting dependencies
I also ...
0
votes
1
answer
45
views
How to get the URL endpoint and the GET/POST method when an Exception occurs?
I use a suspend function to call the API as shown in the code below. How can I get the URL endpoint and the GET/POST method when an Exception occurs?
suspend fun <T : BaseResponse> safeCallApi(
...
1
vote
0
answers
14
views
Can't run Retrofit with MockWebServer using TestScope Jetpack Compose
when i try to call frankfurterApi.convert with test scope, the test instantly gets terminated(println("here2") doesn't get called), but with runBlocking everything works good, just like with ...
0
votes
0
answers
27
views
Paging 3 with Ktor Server: Unable to create converter for class ApiResponse error=java.lang.IllegalArgumentException: Unable to create converter
I'm encountering an issue while trying to paginate data from a Ktor server using the Paging 3 library in my Android project. The error I'm receiving is:
error=java.lang.IllegalArgumentException: ...
0
votes
0
answers
28
views
The payload part in a token is short by 2 characters
I'm trying to run an API POST method in my android application in order to get a token.
I tried running in Postman and it gives a token that has 636 characters, however it only gives me a token of 634 ...
0
votes
0
answers
10
views
How to use a backup key with CertificatePinner Retrofit
val certificatePinner: CertificatePinner = CertificatePinner.Builder()
.add(
certificateBase,
certificateSHA
).build()
builder.certificatePinner(...
1
vote
2
answers
55
views
How to wait for webApi response with retrofit enqueue?
I use the following function to check the username and password from the web service. I want to use this function in different activities. But before I get a response from the server, the function ...