【问题标题】:Access webhook URL from browser从浏览器访问 webhook URL
【发布时间】:2021-11-01 05:58:45
【问题描述】:

我在 Azure 自动化中创建了一个运行手册并为其启用了 webhook,我可以使用 powershell 调用 webhook 是否有任何其他选项可以在不使用 powershell 或任何其他代码的浏览器中调用 webhook

$webhookURI="xxxx" Invoke-WebRequest -Method Post -Uri $webhookURI

【问题讨论】:

    标签: azure azure-automation azure-webhooks


    【解决方案1】:

    您可以在您的机器上安装 Postman 以发出任何类型的 HTTP 请求。 当您不想编写任何 PowerShell 脚本或代码时,这是调用 Azure Webhooks(或任何 HTTP API 调用或挂钩)的推荐且最简单的方法。 https://www.postman.com/downloads/

    如果您不想安装任何软件,您甚至可以直接在浏览器中使用 Postman。您需要先注册:https://web.postman.co/

    Postman 为您提供了一个简洁易用的 UI,用于创建请求并将请求发送到 API 端点并查看响应。创建一组请求后,您甚至可以使用集合运行器通过单击按钮运行所有已保存的请求,并为您的响应编写 Postman 测试以验证请求是否成功。

    您可以在此处查看如何使用 Postman 创建和发送 HTTP 请求:https://learning.postman.com/docs/sending-requests/requests/

    Postman 还有一个名为 Newman 的命令行运行程序,可用于使用终端或 windows cmd/powershell 运行保存的 postman 请求,并在需要时与 devops 管道完美集成(用于在CICD)https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/#:~:text=Newman%20is%20a%20command%2Dline,directly%20from%20the%20command%20line.&text=Newman%20maintains%20feature%20parity%20with,the%20collection%20runner%20in%20Postman.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-13
      • 2020-11-01
      • 2013-11-06
      • 2011-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多