io.ktor:ktor-client-core:1.1.3
io.ktor:ktor-client-js:1.1.3
"io.ktor:ktor-client-json-js:1.1.3
Client JS
Im Using :
HttpClient()
{
install(JsonFeature) {
serializer = KotlinxSerializer(Json.nonstrict)
}
install(HttpCookies) {
// Will keep an in-memory map with all the cookies from previous requests.
storage = AcceptAllCookiesStorage()
}
}
Against Vertx server, vertx is returning a session cookie but is not being stored
response headers:
HTTP/1.1 200 OK
access-control-allow-origin: *
content-type: application/json
content-length: 294
set-cookie: vertx-web.session=7c4fa75e69a2f3d8df94efd8f109f1a8; Path=/
is there an extra step?, since you are wrapping fetch api i I noticed it needs to set a parameter:
credentials: 'include'
regards.
I have crash with storage = AcceptAllCookiesStorage() in iOS
I'd like to add that I'm building a multiplatform project and I have the same issue on an Android build on version 1.1.3.
It does not regard any received set-cookie headers to store the cookies.
Edit:
For more information on the IOS crash....
I have found that the crash is related to ktor_mutex_create hitting a bad address, but i'm limited in getting any more information out of it. EXC_BAD_ACCESS (code=1, address=0x8)
I'm facing the same issue when using my own custom CookiesStorage on iOS
Hi, any way how to workaround this? I'm using 1.2.2 version now and isn't working, how I can add credential:include?
i tried doing this.. https://github.com/NikkyAI/ktor/commit/cebc83268bfd7deee9f039c29b834f0a30783f3d
this fix should fix the missing credentials: 'include'
but i guess it still does not receive the cookies.. it appears in the browser application though
but the HttpResponse does not get anything
The issue is fixed with cookies refactoring in 1.3