Azure Logic Apps : Get HTTP Request Header Key Value into Conditional Check

拜拜、爱过 提交于 2019-12-10 10:11:44

问题


I've created a Logic App in the Azure Portal. It's triggered by an HTTP POST and in that POST I have set a Key called "jmb_private_key". After the Logic App receives the HTTP Request I've placed a Conditional which I want to check for the Key.

Checking for Header CONTAINS 'myvalue' does not work.
I want to check Header.Keys['jmb_private_key'] EQUALS 'myvalue' but I don't know how that is done.

When I check the run of the Logic App, I see the correct JSON payload was delivered, but condition was not met, even though the correct value is in the JSON.


回答1:


Thanks to @Thomas for the answer in comments above.

Switch the Logic App Designer to Code View and then replace the Conditional code with something like this:

            "expression": {
                "and": [
                    {
                        "equals": [
                            "@triggerOutputs()?['headers']?['jmb_private_key']",
                            "yourkeyvalue"
                        ]
                    }
                ]
            },


来源:https://stackoverflow.com/questions/50238995/azure-logic-apps-get-http-request-header-key-value-into-conditional-check

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