ai_user and ai_session is only present in Request Header. sails.sid is present in Response header which I am able to fetch. But I am unable to get ai_user and ai_session as this is only part of request header.
I tried with the below code but getting error . Actually these cookies (ai_session, ai_user, user) are part of Request header and is not available in Response header. Unable to track these cookies using gatling. Please help
Cookies don’t come from a request.
They either come from a response (set-cookie header) or are manually added in JavaScript in the front-end layer.
You must figure out how they are populated in your application. getCookieValue will only let you fetch a cookie from the cookie jar after it was populated, either from the response of a previous request, or because it was manually added with addCookie.
Thanks for your response. I am able to set cookie now in Cookie jar and the same cookie is passed in subsequent request. But now I am getting http error code 400.
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax