title: iOS - Get Header Results
body: <p>A quick question. I have the following code which gets the mod date of a file on a server:</p>
  
  <pre><code>- (void) sendRequestForLastModifiedHeaders
  {
      /*  send a request for file modification date  */
      NSURLRequest *modReq = [NSURLRequest requestWithURL:[NSURL URLWithString:URLInput.text]
                                          cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60.0f];
      [[NSURLConnection alloc] initWithRequest:modReq delegate:self];
  }
  - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response 
  {
      /*  convert response into an NSHTTPURLResponse, 
      call the allHeaderFields property, then get the
      Last-Modified key.
      */
  
      NSHTTPURLResponse *foo = [(NSHTTPURLResponse *)response allHeaderFields];
  
      NSString * last_modified = [NSString stringWithFormat:@"%@",
                              [[(NSHTTPURLResponse *)response allHeaderFields] objectForKey:@"Last-Modified"]];
  
      NSLog(@"Last-Modified: %@", last_modified );
  
  } 
  </code></pre>
  
  <p>My main question is the following:</p>
  
  <p>Does this call only send over the header? If the file is big I do not want the whole file being downloaded. That is why I'm checking the header.</p>
  
  <p>+++++++++++++++++++++++++++++++++++++++
  After the update this works...
  Thanks now looks like:</p>
  
  <pre><code>NSMutableURLRequest *modReq = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:               URLInput.text]
                                          cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60.0f];   
  [modReq setHTTPMethod:@"HEAD"];
  </code></pre>