Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexample.js
More file actions
Latest commit
35 lines (23 loc) · 906 Bytes
/
Copy pathexample.js
File metadata and controls
35 lines (23 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
constwayscript=require("wayscript");
// Set up http trigger with js
letdata={"hello": "world"};
letheaders={"x-my-custom-header": "hello"};
letstatus_code=200;
letresponse=wayscript.http_trigger.sendResponse(data,headers,status_code);
console.log(response)
// Get wayscript context with js
letevent=wayscript.context.getEvent();
console.log(event);
letprocess=wayscript.context.getProcess();
console.log(process);
letprocessDetail=wayscript.context.getProcessDetailExpandedData();
console.log(processDetail);
letlairTrigger=wayscript.context.getLairTrigger();
console.log(lairTrigger);
letlair=wayscript.context.getLair();
console.log(lair);
letworkspace=wayscript.context.getWorkspace();
console.log(workspace);
letapplicationKey=wayscript.utils.getApplicationKey()
letuser=wayscript.context.getUserByApplicationKey(applicationKey);
console.log(user)