HTTP Session.
Session data are encoded into an HTTP cookie, and can only contain simple String values.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Returns a new session with the given key-value pair added.
Returns a new session with the given key-value pair added.
For example:
session + ("username" -> "bob")
Value parameters
- kv
-
the key-value pair to add
Attributes
- Returns
-
the modified session
Returns a new session with elements added from the given Iterable.
Returns a new session with elements added from the given Iterable.
Value parameters
- kvs
-
an
Iterablecontaining key-value pairs to add.
Attributes
Returns a new session with the given key removed.
Returns a new session with the given key removed.
For example:
session - "username"
Value parameters
- key
-
the key to remove
Attributes
- Returns
-
the modified session
Returns a new session with the given keys removed.
Returns a new session with the given keys removed.
For example:
session -- Seq("username", "name")
Value parameters
- keys
-
the keys to remove
Attributes
- Returns
-
the modified session
Retrieves the session value associated with the given key.
Retrieves the session value associated with the given key.
Attributes
- Throws
-
NoSuchElementException
if no value exists for the key.
Optionally returns the session value associated with a key.
Optionally returns the session value associated with a key.