How to get cookie value from the request header?
I have written this piece of code, as it is returning null because the cookie is under request headers.
def response = WS.sendRequestAndVerify(findTestObject(‘PriceAndAvailability/getGivenPartNumbersPrice’, [(‘baseUrl’) : GlobalVariable.url]))
def headerFields = response.getHeaderFields()
println headerFields
println headerFields[‘Set-Cookie’]
Someone please help