This is my code for frontend which calls for my session
await fetch("https://localhost:5001/api/session", {
method: "GET",
credentials: "same-origin",
})
This is my code for the api when sets a session
[HttpGet]
public ActionResult<string> CallMe()
{
HttpContext.Session.SetString("Who", "Doctor Who");
return Ok();
}
This should set a cookie in my browser on call but nothing shows up there .Code when I try to get the cookie on my other controller
[HttpGet]
public ActionResult<string> CallMeToo()
{
string a = HttpContext.Session.GetString("Who");
return Ok();
}
This returns null after the set call I call this too.