How to retrive value from multiple "set-cookie" headers

Hi there,

I read here at other questions about gatling save my session cookies automatically, so now I’m trying to obtain all values from my diverse “set-cookie” response headers and save those values in a .csv file.

My code below are saving only the first “set-cookie” that is displayed at response headers:

.check(header(“set-cookie”).saveAs(“cookies”))

How can I save all ocurrences of “set-cookie” thats related to my request?

Tks.

Hello,

you can use .findAll to capture all occurrence
like .check(header(“set-cookie”).findAll.saveAs(“cookies”))

This section of doc will help you to understand different ways of extracting the data
https://gatling.io/docs/current/http/http_check/#extracting

Thanks
Sujin Sam