Question
Capgemini
IN
Last activity: 16 Oct 2018 12:03 EDT
How to capture Cookie information in Connect Rest response headers using POST method
Hi,
I need to capture cookie value that is being sent in Connect Rest response headers.
When I hit the service using soap ui, I can see that response headers has "Set-Cookie" repeated 3 times as depicted in attached screenshot cookie.PNG.
Now in Pega when I am trying to map the "Set-Cookie" value to clipboard property, it is setting the last occurrence value whereas requirement is to capture the first occurrence value i.e. value starting with ObSSOCookie . Screenshot attached for Connect-Rest Post configuration i.e ConnectRest.PNG.
Any leads would be appreciated.
***Edited by Moderator Marissa to update categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
To get the first occurrence of the cookie value, had to modify OOTB activity pyInvokeRestConnector.
Java step in this activity always gets the last header using getLastHeader method so changed it to getFirstHeader to meet our requirement.