Commit 305886fa authored by Krit Punpreuk's avatar Krit Punpreuk

Update perform.js

parent 9cd012b9
......@@ -10,19 +10,22 @@ function execute_function(context,output,response){
var output_type = 'text';
var url = param.url;
var body = param.body;
var env = {
'output' : {
'meta' : meta,
'data' : data
},
'url' : ''
'url' : '',
'body':''
}
var script = new vm.Script("url=`" + url + "`");
var script = new vm.Script("url=`" + url + "`;body=`" + body + "`");
var context = new vm.createContext(env);
script.runInContext(context);
url = env.url;
body = env.body;
var reject = true;
......@@ -51,7 +54,7 @@ function execute_function(context,output,response){
// Setup Body if POST or PUT
if(method == 'POST' || method == 'PUT') {
if(typeof param.body == 'object') {
option.body = param.body
option.body = body
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment