8,510 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
72
views
Parsing Streaming response from OpenAI using Retrofit and Gson/Moshi
I'm trying to parse the response from OpenAI transcription API with streaming enabled.
The request is:
curl https://api.openai.com/v1/audio/transcriptions \
-H "Authorization: Bearer $...
1
vote
1
answer
81
views
How to upload image from photo picker?
I let user to pick and image from their gallery via photo picker (compose variant) as described here.
It works fine, I got URI that can be used in Coil's AsyncImage to display the image.
Then, I need ...
0
votes
1
answer
64
views
"Using buffer(Sink) is an error. moved to extension function" when writing Retrofit response to a File
I’m migrating to Okio 3 (pulled in via OkHttp/Retrofit). This legacy code now fails to compile:
val response = api.downloadFileFromUrl(url).execute()
val sink = Okio.buffer(Okio.sink(destination)) // &...
1
vote
0
answers
84
views
Unexpected character (at line X, character Y) with no clear source
I'm using Flutter, Dio, and Retrofit in an MVVM architecture.
Recently, I started getting this error:
FormatException: Unexpected character (at line 146, character 3)
The debug console shows no ...
1
vote
2
answers
187
views
How to solve exception "toJson() method have to add to MultipartFile" when uploading image?
I'm using the retrofit package with dio in Flutter to upload a file using @MultiPart() and MultipartFile. But when I run build_runner, I get this error:
retrofit_generator on lib/features/schedule/...
0
votes
1
answer
60
views
laravel response status code is always 200 in android retrofit
I have an android app which uses laravel as backend. The problem is that laravel always send a 200 status code instead of sending the proper 400 status code. here is my code in laravel:
public ...
0
votes
0
answers
47
views
How to properly implement API calls in Android Fragment using Coroutines and Retrofit?
Im trying to make a app in android studio about calculating descriptors from a molecule with SMILES. I use Kotlin for my app and for HTTP-client retrofit. But for calculating descriptors, I use Python....
0
votes
1
answer
46
views
Retrofit large multipart request body cut off
Im sending large .wav file as multipart header using Retrofit for Android. when the audio file gets to about 700Kb, the request is cut off
Content-Type: multipart/form-data; boundary=0e9a827b-f32b-...
0
votes
1
answer
111
views
Null Check used on Null value
trying to generate api client file using retrofit but getting error on one specific file which says null check operator used on null value and the error log using --verbose for build_runner is
Null ...
3
votes
4
answers
1k
views
Flutter Error: Type 'ParseErrorLogger' not found
I have a flutter project using retrofit that was working fine.
I decided to move my freezed models and retrofit files to a separate project in order to be reused with another project. I updated my ...
0
votes
1
answer
68
views
Retrofit recognizes Google Cloud REST API relative path as malformed URL
I've created firebase project and registered web app and got api key.
Then i've tried to test firebase Auth REST API using retrofit java library. By refering to firebase REST API documentation base ...
0
votes
0
answers
47
views
When API Gateway encode request body to base64?
If I set content type via Interceptor from okhttp, an API Gateway will encode request body to base64.
If I set content type via Headers annotation from Retrofit, the sever will not encode to base64.
...
0
votes
1
answer
77
views
How to handle Array of data in retrofit response
I am building an app need to pull some data from 2 endpoints: /api/products and /api/type
The first endpoint return a JSON and this is working fine. However, the second endpoint does not return a json ...
0
votes
1
answer
47
views
Retrofit and Response<Void>
I use retrofit for this request. You can see that the method returns a Response object, which is required to get some information about the progress of the request.
@POST("/test")
...
0
votes
1
answer
37
views
How to find the solution of this error in code which is described below?
Error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ **
Activity : MainActivity.kt
fun getData() {
apiCall().apiService.getData()
....