【发布时间】:2020-09-12 01:21:35
【问题描述】:
下面是 index.js 中的方法
function costOfItemHandler(agent) {
const itemName = agent.parameters.foodItem;
const url = "https://fast-beach-13460.herokuapp.com/Eatery";
return axios.get(url)
.then((result) => {
console.log('result is '+ result);
});
在日志中出现 textPayload:“result is [object Object]”。 当我浏览网址时,它会给出正确的响应。
【问题讨论】:
-
函数在哪里调用
-
在 dialogflow 内联编辑器中。
标签: javascript node.js firebase dialogflow-es dialogflow-es-fulfillment