title: ios get the headers from NSURLRequest I get error [NSConcreteMutableData allHeaderFields]: unrecognized selector
body: <p>I'm trying to get the headers of the NSURLRequest with the following line:</p>
  
  <pre><code>NSString *contentType = [[(NSHTTPURLResponse *)data allHeaderFields] valueForKey:@"Content-Type"];
  </code></pre>
  
  <p>but I'm getting the following error:</p>
  
  <pre><code>-[NSConcreteMutableData allHeaderFields]: unrecognized selector sent to instance 0x8d876e0
   *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData allHeaderFields]: unrecognized selector sent to instance 0x8d876e0'
  </code></pre>
  
  <p>Any of guys know why of this error or how can I fixed or what I'm doing wrong?</p>
  
  <p>I'll really appreciate your help</p>