Commit f6bae9d1 authored by XieChuanJin's avatar XieChuanJin

Merge branch 'dev' of http://gitlab2.dui88.com/laoqifeng/zeroing-libs into dev

parents 378a0515 34e797e3
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -36,11 +36,10 @@
},
"output": [
"success",
"failed",
"exception"
],
"id": "http-request",
"script": "var url = engine.findVariable('url', args, props);\nvar type = engine.findVariable('type', args, props);\nvar params = engine.findVariable('params', args, props);\nvar headers = engine.findVariable('headers', args, props);\nif (!url) {\n console.log('url is empty');\n next('exception', '\\'url is empty\\'');\n}\nelse {\n engine.httpRequest(url, props.method, params, type, headers)\n .then(function (data) {\n next('success', data);\n }, function (err) {\n next('failed', err);\n });\n}\n",
"script": "var url = engine.findVariable('url', args, props);\nvar type = engine.findVariable('type', args, props);\nvar params = engine.findVariable('params', args, props);\nvar headers = engine.findVariable('headers', args, props);\nif (!url) {\n console.log('url is empty');\n next('exception', 'url is empty');\n}\nelse {\n engine.httpRequest(url, props.method, params, type, headers)\n .then(function (data) {\n next('success', data);\n }, function (err) {\n next('exception', err);\n });\n}\n",
"group": "net",
"type": "builtin"
}
This diff is collapsed.
......@@ -9,7 +9,7 @@ const headers = engine.findVariable('headers', args, props);
if (!url) {
console.log('url is empty');
next('exception', '\'url is empty\'');
next('exception', 'url is empty');
} else {
engine.httpRequest(url, props.method, params, type, headers)
.then(
......@@ -17,7 +17,7 @@ if (!url) {
next('success', data);
},
err => {
next('failed', err);
next('exception', err);
}
);
}
......@@ -8,5 +8,5 @@
"params": {"type": "map", "alias": "参数" },
"headers": {"type": "map", "alias": "头部" }
},
"output": ["success", "failed", "exception"]
"output": ["success", "exception"]
}
\ No newline at end of file
console.log(args);
\ No newline at end of file
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