I would like to set the value of mycookie
to value=somevalue
, thus:
The recommended approach of using Cookies.Append
does not work, as the value is URL encoded and ends up being value%3Dsomevalue
.
My code for adding the cookie:
_context.Response.Cookies.Append("mycookie", $"value=somevalue");
My code for reading the cookie
_context.Request.Cookies["mycookie"]
The question: what would be the best way to bypass the URL encoding and set the raw value of the cookie?