title: Reading value from cookie in asp.net core
body: <p>I have a problem with reading cookies. In first request I add cookie with method</p>
  
  <pre><code>Response.Cookies.Append("UserName", "Name", new Microsoft.AspNetCore.Http.CookieOptions()
          {
              Path = "/",
              HttpOnly = false,
              Secure = false
          });
  </code></pre>
  
  <p>In next request I want to read value from cookies</p>
  
  <pre><code> var name = Request.Cookies["UserName"]
  </code></pre>
  
  <p>but Request.Cookies is null. But also, when I call this method by typing api in browser</p>
  
  <pre><code>localhost:5555/api/tempController/getCurrenUserName
  </code></pre>
  
  <p><code>var name = Request.Cookies["UserName"]</code> returns me a value and <code>Request.Cookies</code> contains all cookies, which I see in browser.</p>
  
  <p>I don't understand, why in one case it works in another does not work.</p>