title: Swift NSURLConnection sendSynchronousRequest
body: <p>In Objective C the following syntax was possible:</p>
  
  <pre><code>NSHTTPURLResponse *response = nil;
  NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:nil];
  if ([response statusCode] == 404)
  {
  }
  </code></pre>
  
  <p>Now in Swift I have used:</p>
  
  <pre><code>var response : AutoreleasingUnsafeMutablePointer&lt;NSURLResponse?&gt; = nil
  let urlData = NSURLConnection.sendSynchronousRequest(request, returningResponse: &amp;response, error: err)
  </code></pre>
  
  <p>which works, but I cannot access statusCode anymore, because if I use NSHTTPURLResponse it returns an error that NSURLResponse is needed!</p>
  
  <p>Do you know any way to solve this?</p>