将HTTP标头键值提取到变量中

将HTTP标头键值提取到变量中

本文介绍了Azure Logic应用:将HTTP标头键值提取到变量中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我是Logic Apps的新手.我的逻辑应用程序收到一个POST调用,该调用在HTTP标头中具有键值,我想将其提取到变量中以供以后在工作流中处理. 设置变量"操作似乎只能访问触发器主体.我尝试以下通过表达式访问标头,但无法接收该值.

I am new to Logic Apps. My logic app receives a POST call that has key values in the HTTP header that I want to extract into variables for processing later in my workflow. The Set Variable action seems to only be able to access the trigger body. I tried the following to access the headers via an expression, but cannot receive the value.

                "Set_variable_2": {
                    "inputs": {
                        "name": "vsTopicName",
                        "value": "@{triggerOutputs()?['headers']?['CEI-EventType']}"
                    },

在Logic Apps中无法将HTTP标头密钥提取到变量中吗?

Is is not possible in Logic Apps to extract an HTTP header key into a variable?

推荐答案

我上面的代码实际上是正确的并且可以正常工作.问题出在我的头文件没有传递到逻辑应用程序中.我正在使用邮递员发送请求.正文和标准标头都很好,但我的自定义标头还没有.

My code above was actually correct and working. The issue turned out that my header was not being passed into the logic app. I was using Postman to send the request. The body and the standard headers were coming through fine, but not my custom headers.

这篇关于Azure Logic应用:将HTTP标头键值提取到变量中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 16:10