I have noticed that with Gatling, trying to access a Set-Cookie from the response that is set with a different domain than the one I’m working with is not available in the session.
Here is the sample return header:
Set-Cookie: help=some_value; path=/; domain=.myHost.com; secure; HttpOnly; Max-Age=1209600; Expires=Fri, 09-Jun-2017 20:21:31 GMT
and the baseURL of the page i am testing is either localhost (for debugging) or notMyHost.com
if I try some
.check(headerRegex(“Set-Cookie”, “help =([^;]+)”).saveAs(“Access_Token”))
in the session that is logged
.extraInfoExtractor(extraInfo => List(extraInfo.request, extraInfo.response, extraInfo.session))
this specific cookie is not listed.
Other Set-Cookies that are in the same response where the domain is not set, show up fine and are accessible.
is there a way i can somehow capture the content of this cookie as it is set?
is there another way to do this, that maybe is better?
I noticed there are some new cookie methods in 3.0, but it is not in a release state just yet.