title: Receive HTTP Headers via NSURLRequest/NSURLConnection in Cocoa
body: <p>I've been working on figuring out how to receive HTTP Headers via a request made with NSURLConnection. Typically a request is made with something as simple as the following:</p>
  
  <pre><code>    NSURLConnection *connection = [[NSURLConnection alloc]
      initWithRequest:request
          delegate:self];
  </code></pre>
  
  <p>The only way I've personally found in Apple's abundant documentation to receive response headers is via a synchronous call using the following NSURLConnection class method:</p>
  
  <pre><code>+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)error
  </code></pre>
  
  <p>Here I can easily reference a response object of type NSURLResponse. The problem here is that I'm not ready to make synchronous requests via a mobile device, especially with a network that has high latency such as EDGE. Is it possible to get similar results with the default, asynchronous behavior of NSURLConnection?</p>