title: How to read response cookies using Alamofire
body: <p>I am trying to read the response cookies for a post request, as done by Postman below</p>
  
  <p><a href="https://i.stack.imgur.com/VgDZC.png"><img src="https://i.stack.imgur.com/VgDZC.png" alt="enter image description here"></a></p>
  
  <p>The way I am trying without success right now is</p>
  
  <pre><code>    var cfg = NSURLSessionConfiguration.defaultSessionConfiguration()
      var cookies = NSHTTPCookieStorage.sharedHTTPCookieStorage()
      cfg.HTTPCookieStorage = cookies
      cfg.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicy.Always
  
      var mgr = Alamofire.Manager(configuration: cfg)
  
  
      mgr.request(.POST, "http://example.com/LoginLocalClient", parameters: parameters).responseJSON { response in
  
                  print(response.response!.allHeaderFields)
  
                  print(NSHTTPCookieStorage.sharedHTTPCookieStorage().cookies)
  }
  </code></pre>
  
  <p>The first print statement contains the 10 header fields without the cookies, the second one contains an empty array. </p>
  
  <p>Any ideas?</p>