在Azure逻辑App中如何将Cookie传递给Http请求 [英] In azure logic App how to pass Cookie to Http request

查看:138
本文介绍了在Azure逻辑App中如何将Cookie传递给Http请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在azure逻辑应用程序中,通过调用第一个Http端点,我们需要获取cookie并传递给第二个端点.但是在传递第二个API的同时,我传递了标头,并且它正在发送,但是响应错误(text/html).

In azure logic app by calling first Http endpoint we need to get the cookie and pass to the second endpoint. But while passing second API, I am passing in header and it is sending but the response is wrong(text/html).

但是当我使用邮递员检查时,它工作正常,并在JSON(application/json)中得到了响应.

But When I checked by using postman it worked fine got response in JSON(application/json).

通过逻辑应用程序调用第二个API或端点后获得的标头是:

The header getting after calling second API or endpoint through logic app ,I am getting is:

    {
        "statusCode": 200,
        "headers": {
            "Cache-Control": "no-store, must-revalidate, no-cache",
            "X-Powered-By": "Undertow/1",
            "Set-Cookie": "JSESSIONID=Ntu9NMCoekk56JveKceina3FCwgNJptU4EK0GOIz.s192-169-141-210; path=/StLightControl",
            "Server": "WildFly/10",
            "Pragma": "no-cache,no-cache",
            "Date": "Tue, 12 Jun 2018 14:25:45 GMT",
            "Connection": "keep-alive",
            "Content-Length": "2585",
            "Expires": "0,0",
            "Content-Type": "text/html; charset=UTF-8"
        }
}

推荐答案

添加新参数"下拉菜单允许您启用一个复选框,该复选框显示"Cookie",使您可以输入HTTP cookie(如果需要,可以从动态内容中输入)到).您无法直接在下拉菜单中输入值,因此请在选中复选框后将其关闭,然后在验证"字段下方看到一个神奇的Cookie字段.

The "Add new parameter" dropdown allows you to enable a checkbox that says "Cookie" that enables you to enter the HTTP cookie (from dynamic content if you want to). You cannot enter the value straight in the dropdown, so close it down after you selected the checkbox and see a magic Cookie field appear underneath the Authentication field.

可在此处找到更多信息:操作方法:从Logic App调用具有Cookie身份验证的API

More information to be found here: HowTo: Call an API with cookie authentication from a Logic App

这篇关于在Azure逻辑App中如何将Cookie传递给Http请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆