AspNetCore.Cookies creating a problem, and failing with 401 error

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:

.get(uri2b + “/collect?v=1&_v=j91&a=2098919082&t==289830161”)
.header(“cookie”, “${value}”)

.header(“cookie”, “${value}”)

Sweta S Bala