AcceptAllCookiesStorage() in Client JS is not working
See original GitHub issueKtor Version
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
Ktor Engine Used(client or server and name)
Client JS
Feedback
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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
`require 'socket.io-client.js'` not working - Stack Overflow
The require() function is a feature of Node.js and only works on the Javascript that is run on the server side. To include...
Read more >WhatsNew 1.6 | Ktor Framework
JS client seem to ignore `HttpCookies` feature (or header more generally) in browser target, but not in nodejs one.
Read more >Client Side JavaScript does not run at all
Solved: Hello everyone, I'm looking for some help with client side scripting using javascript. I've been stuck on this for a couple of...
Read more >@sanity/client - npm
Argument is a plain JS object representing the document. It must contain a _type attribute. It may contain an _id . If an...
Read more >SMART on FHIR JavaScript Library | SMART JS Client Library
It is not maintained any more, and it would require Jquery to be included in the page. Newer versions of fhir.js work fine,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is fixed with cookies refactoring in
1.3
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)