title: NSURLResponse does not have a member named allHeaderFields
body: <p>I'm making a POST request to an API and I get the response successfully in Swift. Below is my code.</p>
  
  <pre><code>private func getData(url: NSURL) {
      let config: NSURLSessionConfiguration = NSURLSessionConfiguration.defaultSessionConfiguration()
      let session: NSURLSession = NSURLSession(configuration: config)
  
      let dataTask: NSURLSessionDataTask = NSURLSession.sharedSession().dataTaskWithURL(url, completionHandler: {(data: NSData!, response: NSURLResponse!, error: NSError!) -&gt; Void in
  
          if error {
              println("Error Occurred: \(error.localizedDescription)")
          } else {
              println("\(response.allHeaderFields)") // Error
          }
      })
      dataTask.resume()
  }
  </code></pre>
  
  <p>I'm trying to dump the header fields using <code>allHeaderFields</code> but I get an error saying <strong>NSURLResponse does not have a member named allHeaderFields</strong>. But it <em><a href="https://developer.apple.com/library/prerelease/mac/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPURLResponse_Class/index.html#//apple_ref/occ/instp/NSHTTPURLResponse/allHeaderFields" rel="nofollow">does</a></em> have it!</p>
  
  <p>There must be something wrong with the syntax or the way I'm calling it. Can anyone please tell me how to correct this?</p>
  
  <p>Thank you.</p>