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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on your definition of
with, you probably forgot to commit your session after you set values in it.Also, you’re using
curlto test this system.curldoesn’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.