问题描述
我正在运行以下Javascript代码:
const httpPost = (title,msg,trigger,key) => {
const URL = `https://maker.ifttt.com/trigger/${trigger}/with/key/${key}`
const data = {
value1: title,value2: msg
}
fetch(URL,{
data: data,headers: { "Content-Type": "application/json" },method: "POST"
}).then(console.log).catch(console.error)
}
网络挂钩被触发。但是,未提供这些值。
当我检查https://ifttt.com/activity/applet/...
时,我看到它已被触发并且值是空的。
即使我JSON.stringify()
数据,值字段仍然为空。我在做什么错了?
我还尝试了data
或body
作为选项,而不是payload
。结果没有改变。
有什么想法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)