CreateWebSession (open)
Create a new session
Syntax
LOADLIB "mod::system/lib/webserver.whlib";
STRING FUNCTION CreateWebSession(STRING scope, RECORD sessdata, VARIANT ARRAY args)
Parameters
STRING scope
Scope for session (must be unique for each CreateWebSession usage so users can't try to get other GetWebSessionData readers to use their calls)
RECORD sessdata
Initial session data
VARIANT ARRAY args
Return value
STRING
A random session id which can be used to refer to the session
Description
Create a session, and set its initial data and expiry time. Note that a sesson can't expire while any scripts that referred to it are still running. Set option json := TRUE for compatibility with TypeScript session management