title: Swift Vapor Cookies not working
body: <p>I am trying to create cookies, but I am not seeing any cookie in browser. Instead of that I am getting different output on Postman &amp; different output on chrome browser.</p>
  
  <p>blow is how I code to create cookies.</p>
  
  <ol>
  <li><p>Create route</p>
  
  <pre><code>drop.get("create", handler:createCookie)
  </code></pre></li>
  <li><p>Handler</p>
  
  <pre><code>func createCookie(request: Request) throws -&gt; ResponseRepresentable {
  
  let cookie = Cookie(name: "login", value:"value", expires: generateExpirationDate(), secure: true)
  request.cookies.insert(cookie)
  
  return "Done"
  }
  </code></pre></li>
  <li><p>below is func to create expiration handler</p>
  
  <pre><code> func generateExpirationDate() -&gt; Date {
    return Date() + (60 * 1) // 1 Minutes later
   }
  </code></pre></li>
  </ol>
  
  <p><strong>In post man I am getting one cookie named "vapor-sessions"</strong> 
  <a href="https://i.stack.imgur.com/k9sBd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k9sBd.png" alt="enter image description here"></a></p>
  
  <p><strong>And in chrome browser I am getting two cookies as in below picture.</strong>
  <a href="https://i.stack.imgur.com/GLWw3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GLWw3.png" alt="enter image description here"></a></p>
  
  <p><strong>But my desired one is not there. !!!!!!!</strong></p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p><strong>I also have tried below code but no luck for Postman, but this one 'works in chrome', I have doubt for other browsers !!!!</strong></p>
  
  <pre><code>func createCookie(request: Request) throws -&gt; ResponseRepresentable {
  
      let cookie = Cookie(name: "login", value:"value", expires: generateExpirationDate(), secure: true)
  
      let response = try Response(status: .ok, json: JSON(node: [
          "yo": "yoyo"
          ]))
  
      response.cookies.insert(cookie)
  
  
      return response
  }
  </code></pre>