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'? –