我想要一個HTTP POST發送到https://maker.ifttt.com/trigger/event_name/with/key/xxxxxxxxxxxxxxxxxxxxxxxxxxx
使用IFTTT商網絡掛接採用了棱角分明2.POST到IFTTT採用了棱角分明2
正在接收請求,但身體不行。
post(): Promise<string> {
let headers = new Headers({ 'Content-Type': 'application/json'});
let options = new RequestOptions({ headers: headers });
console.log(options)
let body = { "value1": "21223232"};
console.log(body)
return this.http.post(this.webhookUrl, body, options)
.toPromise()
.then(this.extractData)
.catch(this.handleError);
應該有value1: 21223232
並與{{值1}}見諸報端,但我沒有得到運氣。
另外值得注意:
curl -X POST -H "Content-Type: application/json" -d '{"value1":"21223232"}' https://maker.ifttt.com/trigger/event_name/with/key/xxxxxxxxxxxxxxxxxxxxxxxxxxx
工作
有沒有人經歷過這個?