O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Session handling in Snap

In this recipe, we will work with session manager data type, SessionManager in Snap. The HTTP is a connection-less protocol, and the concept of a session has to be built on top of  the interaction between client and server. The session is usually represented by some key-value pair that can be persisted across the interactions between a client and the server. In HTTP, this can be done in multiple ways--one of the most popular ways of handling a session is to set the session cookies. The session cookies are retained by the browser for a particular interaction duration.

In this recipe, we will set session cookies through cookie based the session manager in Snap.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required