Trusted Contributor.. sunts Trusted Contributor..
Trusted Contributor..
664 views

Attaching Cookies with HTTP Client GET/POST

I'm dealing with a web service that allows Basic authentication. Once authenticated, the authorization header can be omitted on subsequent requests and replaced with a cookie returned from the first request.

As per the description on these operations, if i set useCookies to true, I can see the cookie is passed between different steps when all contained on the same flow.
However, I am looking to generalise this flow and break it down in to sub flows, when I do that the cookie from the parent flow is no longer passed to subsequent calls in child flows.

Is there anyway to pass the cookie via the HTTP Client operations or will I need to resned the authorization header each time?

Thanks
Sunts

0 Likes
3 Replies
Olman_Q_OO Respected Contributor.
Respected Contributor.

Re: Attaching Cookies with HTTP Client GET/POST

 Thank you for contacting Microfocus Forum.

 My name is Olman, I am from the OO/CSA team.

Regarding your question, unfortunately, the guide doesnt explain us how to do that or some clue that can cover your question, but what you can do as a workaround is to generate an output with the cookie and pass it to the other subflow.

I hope this information can help you.

Regards

 

Olman Guzman Quesada
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Trusted Contributor.. sunts Trusted Contributor..
Trusted Contributor..

Re: Attaching Cookies with HTTP Client GET/POST

I can extract the cookie from the responseHeaders result, but how do I pass that to a sub flow that the HTTP Client operations inside can leverage?
The HTTP Client operations don't appear to have any input that you can pass a cookie to, so do the operations look for the cookie set within the context? If so, I assume I need to know what the name of the context variable needs to be in order for me to set it?

0 Likes
Olman_Q_OO Respected Contributor.
Respected Contributor.

Re: Attaching Cookies with HTTP Client GET/POST

Hi,

Please follow the steps that are on the studio guide that can help you with the cosnfiguration of the flow.

Olman Guzman Quesada
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.