【发布时间】:2021-09-22 14:28:31
【问题描述】:
我有一个 WooCommerce Webhook 希望我将 JSON 发送到 URL,我相信这是一个 POST http 请求。
我使用 Webhook.site 测试了 Webhook,它显示了正确的 JSON 负载。
开发人员建议我使用云函数来接收 JSON,解析 JSON 并将其写入 Cloud Firestore。
是否有关于 Cloud Functions for Firebase 或 Google Cloud Platform 的 Cloud Functions 的文档详细说明了此过程?
我在 Cloud Firestore 文档中没有找到任何内容。
另一个可用的解决方案可能是将 Webhook JSON 发送到云存储,但我也没有设法让它工作。我想我可能需要将身份验证集成到 HTTP 请求标头中才能成功。
参考和文档:
“使用云功能扩展 Cloud Firestore”https://firebase.google.com/docs/firestore/extend-with-functions
“云函数 - HTTP 函数”https://cloud.google.com/functions/docs/writing/http
【问题讨论】:
标签: json firebase api google-cloud-firestore webhooks