1
由于我只使用已生成的默认模板:如何使用简单的HttpGET-CRUD-NodeJS示例?
module.exports = function (context, req, intable) {
context.log("Retrieved records:", intable);
context.res = {
status: 200,
body: intable
};
context.done();
};
和下面的JSON文件:
{
"bindings": [
{
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get"
],
"authLevel": "function"
},
{
"type": "http",
"direction": "out",
"name": "res"
},
{
"type": "table",
"name": "inTable",
"tableName": "person",
"connection": "serverlessexamplestorage_STORAGE",
"direction": "in",
"take": "100"
}
],
"disabled": false
}
我怎么才能成功地调用该函数吗?
这是有道理的。我也在使用邮差,但是当我用POST运行HttpPost示例时,我忘了将下拉改为GET。这是一个单独的问题,是否有办法动态修改'json'配置文件,以便在'inTable'填充之前改变'TableName'? –