Azure 逻辑应用程序和 http 阶跃响应

标签 azure azure-web-app-service azure-logic-apps

我有 2 个 HTTP 操作,在逻辑应用中一个接一个,如何在第二个 HTTP 操作中读取前一个 HTTP 操作的响应?

第一个 HTTP 调用 (REST) 返回 JSON 格式的响应 -

{

   "authResult": {

      "isPasswordExpired": true,

      "authToken": "cxxcxcxc",

      "message": "Login Successful"
   }
}

我想从第二个 http 操作的结果中发送 authtoken 作为授权 header 。

最佳答案

正如 Derke Li 提到的,我们可以使用表达式或 Parse Json 来做到这一点。我还做了一个有关如何使用 Parse JSON 操作的演示。

1.在第一个Http操作之后添加Parse Json操作

enter image description here

2.添加解析内容,然后单击“使用示例有效负载生成架构”按钮,将弹出一个新窗口。粘贴您的“authResult”json。如下图所示。

enter image description here

3.然后我们可以从动态内容中选取 token 。

enter image description here

4.我们可以检查结果。 enter image description here

关于Azure 逻辑应用程序和 http 阶跃响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46798457/

相关文章:

c# - 我可以将 Microsoft Graph SDK 与 Azure AD Easy Auth 结合使用吗

Azure 应用服务 - 始终在线与运行状况检查

azure - 访问 Azure 逻辑应用程序中的自定义 Blob 元数据

c# - 我可以参数化我在 Azure 逻辑应用中连接到的 Office 365 订阅吗?

azure - Azure VM 上的 SOAP 请求立即返回空结果

azure - 使用azure函数查询地理空间

performance - 从性能角度来看,创建 CloudStorageAccount 或 CloudBlobClient 实例的成本有多高?

azure - 部署到 Azure 网站可能需要数小时才能上线

postgresql - Azure 中 Docker 上的 Postgres

azure - 通过 Azure 逻辑应用从 Azure 容器中上次修改的文件夹中获取 Blob 内容