I have this function:
[HttpPost] [Route("api/authenticate")] public async Task<HttpResponseMessage> Authenticate(Auth a) { var cookies = Request.Headers.GetCookies() } After seeing a lot of posts on StackOverflow, I saw people trying to do this:
CookieHeaderValue cookie = Request.Headers.GetCookies("session-id").FirstOrDefault(); But I don't see the FirstOrDefault method. When I run GetCookies, I got a string array with one element, and inside of it:
"{cookieKey=cookieValue; cookie2=cookie2}" Should I convert this string to dictionary, or am I missing something on the API?