session
Closed this issue · 3 comments
delchev commented
API for 'session'
delchev commented
Usage
/* globals $ */
/* eslint-env node, dirigible */
var session = require('net/http/session');
var response = require('net/http/response');
session.setAttribute("attr1", "value1");
var attr = session.getAttribute("attr1");
response.println("[Attribute]: " + attr);
response.flush();
response.close();
delchev commented
Methods
getAttribute(name)
getAttributeNames()
getCreationTime()
getId()
getLastAccessedTime()
getMaxInactiveInterval()
invalidate()
removeAttribute(name)
setAttribute(name, value)
setMaxInactiveInterval(interval)
ThuF commented
Source: https://github.com/dirigiblelabs/core_api/blob/master/core_api/ScriptingServices/net/http/session.js
Tested with:
- https://github.com/dirigiblelabs/core_api/blob/master/core_api/TestCases/net/http/session/session_attribute_test.js
- https://github.com/dirigiblelabs/core_api/blob/master/core_api/TestCases/net/http/session/session_attribute_names_test.js
- https://github.com/dirigiblelabs/core_api/blob/master/core_api/TestCases/net/http/session/session_remove_attribute_test.js
- https://github.com/dirigiblelabs/core_api/blob/master/core_api/TestCases/net/http/session/session_info_test.js
- https://github.com/dirigiblelabs/core_api/blob/master/core_api/TestCases/net/http/session/session_invalidate_test.js