我能够使用axios检索数据,但似乎无法将其发布到dialogflow的managementText
const getData = async () => {
try {
return await fetch.get(url)
} catch (error) {
console.error(error)
}
}
const countBreeds = async () => {
const breeds = await getData();
}
responseJson.fulfillmentText = countBreeds().body;
}
答案 0 :(得分:0)
感动
responseJson.fulfillmentText = countBreeds().body;
紧接着
const breeds = await getData();
应该是
responseJson.fulfillmentText = breeds.data.body;