title: When does an NSURLRequest time out?
body: <p>The <code>NSURLRequest</code> class (<a href="https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/Reference/Reference.html" rel="nofollow">iOS docs</a>, <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/Reference/Reference.html" rel="nofollow">OS X docs</a>) in Cocoa has a <code>timeoutInterval</code> property. The docs state</p>
  
  <blockquote>
    <p>If during a connection attempt the request remains idle for longer than the timeout interval, the request is considered to have timed out.</p>
  </blockquote>
  
  <p>What does 'idle' mean, here? As best as I can tell, what this means in practice is that if I set a 30 second <code>timeoutInterval</code> and call a method that sends the <code>NSURLRequest</code>, then if the body of the HTTP response hasn't returned 30 seconds after sending the request, the request times out. But is that really what's going on?</p>
  
  <p>A few things I can think of that might trigger the idleness timer to reset: receiving the HTTP headers, or receiving part of the body. But which (if either) matters in reality?</p>