1,350 questions
0
votes
0
answers
52
views
Is this the correct way to add a persistent device UUID header using Ktor client plugin in Android?
I am building an Android app using KOIN for dependency injection, and I want to attach a persistent unique device ID (UUID) to every request from my HttpClient. The UUID should be stored securely so ...
1
vote
0
answers
126
views
+100
Objectify with Kotlin Ktor 3.3
Objectify v6.1.3
With Kotlin and Ktor 3.1, I was calling ObjectifyService.begin() within the init {} block of my request handler base class and then closing that context once the request was finished. ...
0
votes
0
answers
53
views
DiskReadViolation on Ktor with json negotiation
My StrickMode and Ktor HttpClient setup on Android
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
import io.ktor.serialization.kotlinx.json.json
override fun onCreate(...
0
votes
0
answers
43
views
Its there anyway i can make a Exposed transaction on a separate thread share transaction resource with an outer transaction block
Basically i have a ktor exposed web app and i am trying to write this test and client.get("assets") fails to see the asset created in the outer transaction block. It tried to use what is ...
0
votes
1
answer
155
views
How to intercept responses using Ktor on Android
I'm an Android developer.
I'm using Retrofit and had previously created an interceptor for testing purposes.
It intercepts cases that are difficult to reproduce in the actual production environment ...
0
votes
0
answers
51
views
Tests doesn't stop when receive multipart data in KTOR
I need do this for clear clear buffers and not happens infinite loop when i execute my tests on my route.
This code receive data for create one object on database, but if happens one error (raise) on ...
0
votes
1
answer
36
views
How to send a file using ktor-client to R2 with `application/octet-stream` header?
I am trying to make PUT-request to r2.cloudflarestorage.com to upload a file like this:
curl --location --request PUT 'https://*.r2.cloudflarestorage.com/***' \
--header 'Content-Type: application/...
0
votes
1
answer
45
views
How to log to separate ALL and INFO KTOR level files?
I basically would like to have one file using
install(Logging) {
level = LogLevel.ALL
}
And another using
install(Logging) {
level = LogLevel.INFO
}
(everything else stays equal)
My attempts:...
0
votes
1
answer
41
views
ktor client to download gripped XML
I am trying to download https://aviationweather.gov/data/cache/metars.cache.xml.gz but there headers are a bit funny.
They basically respond with a header content-type: application/x-gzip
I think the ...
2
votes
2
answers
156
views
Error with Ktor and Exposed with LocalDate field in Postgres (ClassNotFoundException: kotlinx.datetime.Instant)
I have a small test table in Postgres with a DATE field, and data class in Ktor app. When mapping the database table row result to TestItem the 'updated' LocalDate field generated the error.
import ...
0
votes
0
answers
86
views
Ktor client 3.2.0+ causes first authenticated call to return 400 Bad Request
If I login normally and then call an endpoint, it works fine. (Yes login as first call works fine)
If I restart the app, fetch the stored token from SharedPreferences and make the same request — it ...
0
votes
0
answers
176
views
java.io.EOFException or Content-Length mismatch when using Ktor CIO engine after BouncyCastle FIPS update
After upgrading BouncyCastle dependencies from:
org.bouncycastle:bc-fips:2.0.0 → 2.1.0
org.bouncycastle:bctls-fips:2.0.19 → 2.1.20
I started encountering issues when using the Ktor CIO client engine. ...
1
vote
1
answer
125
views
Ktor Websocket chat Client MVVM best practice
I am building a Chat client feature. I am trying my best to adhere to the MVVM architecture.
I am using Ktor to communicate via WebSocket with my server.
In my data layer, I have class ...
0
votes
1
answer
83
views
Problems with Ktor receiving multipart: Flow invariant is violated
I am rather new to Ktor and try to upload a file to my server. This is the route:
fun Application.module() {
install(ContentNegotiation) {
json()
}
routing {
post("/upload") {
...
3
votes
1
answer
220
views
Space characters in SimpleName 'use streaming syntax' are not allowed prior to DEX version 040
I am facing this issue after changing the Ktor version to 3.2.0.
com.android.tools.r8.internal.Qf: Space characters in SimpleName 'use streaming syntax' are not allowed prior to DEX version 040
I am ...