Azure Logic Apps: Extract HTTP Header Key value into a variable

纵然是瞬间 提交于 2020-05-29 11:00:10

问题


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']}"
                    },

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


回答1:


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.



来源:https://stackoverflow.com/questions/53656120/azure-logic-apps-extract-http-header-key-value-into-a-variable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!