0
votes

In azure logic app I'm calling a http endpoint and getting cookie and i'm passing that cookie to second request. If i check run history it is sending in header while calling second endpoint but the cookie(header) is not reaching second endpoint.

What I have tried:

I've just tried to call second endpoint alone.So, the image i've placed below, shows that i've hardcoded the cookie value manually by calling first endpoint.

enter image description here

2
post code here that you have tried. - baj9032
I've added the image of calling only second API by placing cookie in header manually after calling first API. - ashok
@vikram so you’re passing in cookie to the second endpoint successfully but its response is coming back as html/text, not application/json? - Mike Urnun MSFT
Yeah by using JAVA application and using WSO2 ESB, I have implemented the same use case it is working and returning application/json response which means the cookie is authenticated successfully. But logic app sending in header that we can see in run history but it is not reaching endpoint. - ashok
To confirm that it is not reaching i have tested it. The cookie is implemented like it'll work for only one time. So, if I manually call the second endpoint in postman with the cookie from run history of logic app, it is able to call. Which means Cookie never got sent to the endpoint. - ashok

2 Answers

1
votes

If you set Headers in Body in Http2 and click Code view you will find that it equals to "@outputs('HTTP')['headers']".

enter image description here

It means that you could get key value in Http1 headers by using @outputs('HTTP')['headers']['Key_name'].

enter image description here

The output is: enter image description here

0
votes

See answer in duplicate question In azure logic App how to pass Cookie to Http request

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).