How to get first Cookie in REST Connector

We have Connect-REST service and external service sending multiple Set-cookie and we need to pass first cookie which contains JSESSIONID in next request. But when we map cookie in response header in first invocation we are able to see last cookie only.

Pega version 8.1.5

***Moderator Edit-Vidyaranjan: Updated Platform Capability***


Keep up to date on this post and subscribe to comments

August 18, 2019 - 8:20am

I wonder why you want to do that. REST service should be stateless. If you try to call the same Service-REST many times, each time the JSESSIONID would be different.

August 18, 2019 - 8:44am
Response to KevinZheng_GCS

Thanks for reply. Service maintaining session 2 hours and request to make 2nd service call on words with cookie to improve performance. But Pega is capturing first cookie.