Hi Team,
I have a file which keeps a Main cookie which sends the cookie in each of the header while calling the API. it works great. But now when my main cookie when it is invoked, it creates sub cookies like “.AspNetCore.Cookies”,".AspNetCore.Cookies1" in the response headers, and these AspNetCore.Cookies are passed in the subsequent headers of the further request instead of the main cookie, and my requests are failing with 401 error.
How to deal with this case as response headers of previous requests are being send to the subsequest request instead of the real header cookie value??
.header(“cookie”, “${value}”) - > This is the place where I am sending the main cookie reading from the csv file
Small Example:
.exec(http(“GA”)
.get(uri2b + “/collect?v=1&_v=j91&a=2098919082&t==289830161”)
.headers(headers_3b)
.resources(http(“Op_DealLoca”)
.options(“https://ied-rdl-aws.ext.hp.com/api/v1/DealLocationServiceLevel/${DealID}”)
.headers(headers_8b),
http(“DealLocationSLAInfo”)
.post(“https://iedp--rdl-aws.ext.hp.com/api/v1/DealLocationServiceLevel/DealLocationSLAInfo/${DealID}”)
.header(“cookie”, “${value}”)
.headers(headers_9b)
.body(RawFileBody(“sMPS/smpsperfodeala/0009_request.json”)),
http(“Op_DealLocationSLAInfo”)
.options(“https://iedp-smps-rdl-aws.ext.hp.com/api/v1/DealLocationServiceLevel/DealLocationSLAInfo?dealId=${DealID}”)
.headers(headers_0b),
http(“DealLocationSLAInfo”)
.get(“https://iedp-rdl-aws.ext.hp.com/api/v1/DealLocationLevel/?dealId=${DealID}”)
.header(“cookie”, “${value}”)
.headers(headers_1b),
Regards,
Sweta S Bala