title: Getting Header Response in Swift
body: <p>I am following this answer for making HTTP calls in my swift project. <a href="https://stackoverflow.com/questions/24016142/how-to-make-an-http-request-in-swift">How to make an HTTP request in Swift?</a>  </p>
  
  <p>and following is the code I am using to make a synchronous call</p>
  
  <pre><code>let urlPath: String = "http://apiserver.com/api/login/?username=asdf&amp;password=asdf"
              var url: NSURL = NSURL(string: urlPath)!
              var request1: NSURLRequest = NSURLRequest(URL: url)
  
              var response: AutoreleasingUnsafeMutablePointer&lt;NSURLResponse?&gt; = nil
  
              var error: NSErrorPointer = nil
              var dataVal: NSData =  NSURLConnection.sendSynchronousRequest(request1, returningResponse: response, error:nil)!
              var err: NSError
  
              println("response -- \(response)")
              var jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData(dataVal, options: NSJSONReadingOptions.MutableContainers, error: nil) as! NSDictionary
  
              println("Synchronous \(jsonResult)")
  </code></pre>
  
  <p>is here anyone who can help me to get HTTP Header Response or status code by using this code? please</p>