Contents

timeoutInterval

The request’s timeout interval, in seconds.

Declaration

var timeoutInterval: TimeInterval { get set }

Discussion

If during a connection attempt the request remains idle for longer than the timeout interval, the request is considered to have timed out. The default timeout interval is 60 seconds.

As a general rule, you should not use short timeout intervals. Instead, you should provide an easy way for the user to cancel a long-running operation. For more information, read Designing for Real-World Networks in Networking Overview.

Special considerations

In iOS versions prior to iOS 6, the minimum (and default) timeout interval for any request containing a request body was 240 seconds.

See Also

Controlling request behavior