Skip to content

Context

Context object is used to store and manage properties for a single execution flow (with or without HTTP request)

Basic Usage

var context = require('core/v4/context');
var response = require('http/v4/response');

context.set("attr1", "value1");
var attr = context.get("attr1");

response.println("[Attribute]: " + attr);
response.flush();
response.close();

Functions


Function Description Returns
get(key) Returns the value per key from the context parameters string
set(key, value) Sets the value per key to the context parameters -
Back to top