Context
Context object is used to store and manage properties for a single execution flow (with or without HTTP request)
- Module:
core/context
- Definition: https://github.com/eclipse/dirigible/issues/31
- Source: /core/context.ts
- Status:
stable
- Group:
core
Basic Usage
import { context } from "sdk/core";
import { response } from "sdk/http";
context.set("attr1", "value1");
let 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 | - |