[英]Sending Cookie using Http connector/custom logic app connector
I am trying to invoke a session based webservice from Azure Logic apps which requires session id from authentication request to be sent as a cookie for actual request.我正在尝试从 Azure 逻辑应用程序调用基于 session 的 Web 服务,该应用程序需要 session 来自身份验证请求的实际请求 ID 作为 a.cookie 发送I am able to authenticate and recieve session id successfully, however when i try to send it as cookie in the next step, it is unsuccessful.
我能够成功验证并接收 session id,但是当我尝试在下一步中将其作为 cookie 发送时,它不成功。 Tried below options and got respective responses:
尝试了以下选项并得到了相应的响应:
I tried from SOAP UI and it works when I send cookie in header of the request.我从 SOAP UI 尝试过,当我在请求的 header 中发送 cookie 时它可以工作。 or if I check the 'keep same session' box in SOAP UI.
或者,如果我选中 SOAP UI 中的“保持同一会话”框。 But fails with Logic App.
但使用 Logic App 失败。 could you please help me on how to send cookie from Logic App.
您能帮我了解如何从 Logic App 发送 cookie。 where is it getting missed although I am setting it in my application.
尽管我在我的应用程序中设置了它,但它在哪里被遗漏了。
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). Add new parameter
下拉菜单允许您启用一个显示Cookie
的复选框,该复选框使您能够输入 HTTP cookie(如果您愿意,可以从动态内容中输入)。 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.您不能直接在下拉列表中输入值,因此请在选中复选框后将其关闭,然后在“身份验证”字段下方看到一个神奇的 Cookie 字段。
More information to be found here: How to call an API with cookie authentication from a Logic App .可在此处找到更多信息: 如何使用来自逻辑应用的 cookie 身份验证调用 API 。
Here is the answer: You can use HTTP connectors only for a published service.If you are trying to invoke an internal service below is the response from Microsoft team.答案如下:您只能将 HTTP 连接器用于已发布的服务。如果您尝试调用内部服务,下面是 Microsoft 团队的响应。 In short - HTTP connectors do not use gateway so you cannot establish connection & custom connectors do not suppport Cookies.
简而言之 - HTTP 连接器不使用网关,因此您无法建立连接并且自定义连接器不支持 Cookies。 I would choose option 4 from below.
我会从下面选择选项 4。 Hope this helps:
希望这可以帮助:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.