A simple example of Snaplet and Session here
$ curl http://localhost:8000/sessioin -d "key=k&value=v"
k
getter
$ curl http://localhost:8000/sessioin
getter
I cannot get session in the 2nd request.
A simple example of Snaplet and Session here
$ curl http://localhost:8000/sessioin -d "key=k&value=v"
k
getter
$ curl http://localhost:8000/sessioin
getter
I cannot get session in the 2nd request.
Depending on your definition of
with
, you probably forgot to commit your session after you set values in it.Also, you're using
curl
to test this system.curl
doesn't preserve cookies by default, which is why your session cookie is lost. Try using this (works on my machine):See also the revised answer to your previous question.