从我的网站,我试图将数据保存在另一台服务器上,整个webhook预览:
curl -H "Authorization: Token token=sfg999666t673t7t82" -H "Content-Type: application/json" -H 'Authorization: Bearer oibk2s757l0et81s47uhq47a89w7qbnv' -d '{
"entity":"order",
"order_id":{{ item.entity_id }},
"customer_id":{{ item.customer_id }},
"increment_id":{{ item.increment_id }},
"title": "New order placed",
"message": "Your order has been placed , With Order Id {{ item.increment_id }} will let you know once processed",
"type": 2
}' -X POST 'http://299.247.3.52/fcm/webhook/receive/index/'
但是以下代码不起作用:
$json = json_decode(file_get_contents("php://input"), true);
Or
print_r($_REQUEST)
如何获取标题/帖子值?
也可以在您的PHP代码中进行请求。不在单独的脚本上。