xplugin-nextcode
Version:
51 lines (49 loc) • 1.12 kB
JavaScript
const util = require("../../../util/util");
const schema = {
"node": {
"title": "节点属性",
"type": "object",
"properties": {
"url": {
"title": "URL",
"type": "string",
}
}
},
"input": {
"type": "object",
"title": "节点入参",
"properties": {
"_inputJson": {
"title": "JSON入参",
"type": "string"
},
}
},
"output": {
"type": "object",
"title": "节点出参",
"properties": {
"_json": {
"title": "内容",
"props": {
"foldable": false
},
"type": "string",
}
}
}
}
/**
* http.get
*/
async function get(node, input, engine) {
var result = util.parse(node, input);
var output = await engine.pluginAdapter.plugin.http.httpGet(result.url, result.param);
return output;
}
module.exports = {
"service": "get",
"implement": get,
"schema": schema
}