Questions tagged [ktor]
Ktor is a Kotlin Web framework developed by JetBrains
ktor
1,275
questions
0
votes
0
answers
14
views
Ktor HttpResponse setCookies() only returns one cookie even though others are also available
Im currently trying to authenticate with an api, and need to get some set cookies. In inspect element I can see the set-cookies that I need as attached:
However my code only returns the cookie ...
0
votes
1
answer
18
views
Ktor integration test with custom hostname AND port
Using ktor-testing I need to create a test which uses a custom hostname and port at the same time. See my previous question with custom hostname on port 80 which works, but not on port 8080.
class ...
0
votes
1
answer
22
views
Ktor integration test with custom hostname
Using ktor-testing I need to create a test which uses a custom hostname. (The reason I need this is that we use subdomains to select the upstream service, but that's not really important).
Anyway, I ...
0
votes
0
answers
45
views
How to implement SSL pinning using public key in Ktor client
I am using the Ktor in my native application,
In which I will be receiving the Public key from the login API.
This public key I will be saving in a preference at init
Now I need to use this public ...
0
votes
0
answers
23
views
Compose Multiplatform - TLS sessions are not supported on Native platform on iOs
I'm using Compose Multiplatform and trying to API call. The process is done without any warning on Android but on iOS i facing this error: "TLS sessions are not supported on Native platform"....
0
votes
1
answer
19
views
How to save a response body to a file in Kotlin Multiplatform with Ktor
How to stream a response body to a file in KMP on both Android and iOS using the Ktor client?
0
votes
1
answer
7
views
Multipart data isn't present in the request when calling formData for HttpRequestBuilder
I've tried using the following code, but the results are not as expected. The FormData is missing from the final request.
Is something wrong with how I'm building the HttpRequestBuilder?
val client = ...
0
votes
1
answer
17
views
How to run a background task from within a route's handler in Ktor
How to run a long-running task from a route's handler and restrict the lifetime of the task to the lifetime of the server or the entire application? How to prevent a cancellation of the task caused by ...
0
votes
1
answer
21
views
How to troubleshoot the "Neither port nor sslPort specified" error in Ktor
What could be the reasons for the following error when a server application bundled into a fat JAR is launched?
Exception in thread "main" java.lang.IllegalArgumentException: Neither port ...
0
votes
1
answer
49
views
How to upload large files in KMM using ktor?
I am looking for solution to upload large files(1 GB or more) in KMM using Ktor. If i use ByteArray its not efficient and produces out of memory issue. Is There any way in ktor to upload files using ...
-1
votes
1
answer
39
views
How to upload a video using ktor in iOS?
I've a kmm project. I am trying to upload a video. For small files I can convert Data to ByteArray, but what to do about videos > 30MBs?
For android, I convert File to ByteReadChannel and set as ...
0
votes
0
answers
11
views
Authorization in graphql-kotlin-ktor-server with directive and datafetcher
I would like to use a GraphQLDirective to facilitate authorization while using graphql-kotlin-ktor-server.
This question is about the approach that I am currently planning to use. Is this a good idea? ...
0
votes
0
answers
25
views
Replacing Koin declarations for Ktor Applications
I'm trying to write a REST-API using Ktor and Koin.
I already wrote the authentication part, but when I wonted to test it I couldn't
get Koin to replace the user repository implementation, my Ktor app ...
0
votes
0
answers
27
views
Error in Launching Ktor application with configuration server parameters in Code
I create a ktor project with configuration server parameters in Code
Here is my code
fun main() {
embeddedServer(Netty, port = 8080, host = "0.0.0.0") {
routing {
get(...
0
votes
0
answers
51
views
Ktor FormItem.value is not filtering out boundary element under high load
Hei, we are using Ktor with Netty configuration. Under low load on the server and in test environment everything working OK. In prod when load goes up we are experiencing for very few messages 5-6 per ...