title: Using cookies in ASP.NET Core 2.1
body: <p>I have a simple ASP.NET Core 2.1 application which is supposed to set and then read a cookie.</p>
  
  <p>Whenever I try to read the cookie it returns null. Looking further in the browser's inspect tool I am unable to find it.</p>
  
  <p>I came up with this small implementation to see if I can sort out whats going on, but it is not working..</p>
  
  <pre><code> public async Task&lt;IActionResult&gt; Contact(Contato contato)
   {
      await email.SendAsync(contato);
  
      var option = new CookieOptions();
      option.Expires = DateTime.Now.AddMinutes(10);
      Response.Cookies.Append("EmailEnviado", "true", option);
      var boh = Request.Cookies["EmailEnviado"];
  
      return RedirectToAction("Contact");
   }
  </code></pre>
  
  <p>The variable <code>boh</code>, when inspected through the debugger is null, even though it was written in the previous line.</p>