I am using an API for creating a session and response contains multiple “Set-Cookie”. How can I select a specific cookie, based on the cookie name?
Presently I have the response like this:
headerFields = loginRequest.getHeaderFields()
cookieI = (responseHeaders[‘Set-Cookie’])
cookieI2 = cookieI.toString()
This gives me one long string with all cookies attached. I only want the “session” cookie and ignore all the rest. What do I do to select that specific cookie.
Thank you in advance