abstract class web::WebSession

sys::Obj
  web::WebSession

Source

WebSession provides a name/value map associated with a specific browser "connection" to the web server. Any values stored in a WebSession must be serializable. Get the current WebSession via WebReq.session.

See pod doc.

delete

abstract Void delete()

Source

Delete this web session which clears both the user agent cookie and the server side session instance. This method must be called before the WebRes is committed otherwise the server side instance is cleared, but the user agent cookie will remain uncleared.

get

@Operator
Obj? get(Str name, Obj? def := null)

Source

Convenience for map.get(name, def).

id

abstract Str id()

Source

Get the unique id used to identify this session.

map

abstract Str:Obj? map()

Source

Application name/value pairs which are persisted between HTTP requests. The values stored in this map must be serializable.

set

@Operator
Void set(Str name, Obj? val)

Source

Convenience for map.set(name, val).

toStr

virtual override Str toStr()

Source

Return id.