13

Can you share your answer to me for

  1. NSURLRequest default timeoutInterval time
  2. NSMutableURLRequest default timeoutInterval time
BenMorel
  • 34,448
  • 50
  • 182
  • 322
IOS Rocks
  • 2,127
  • 2
  • 21
  • 24

5 Answers5

20

For both NSURLRequest & NSMutableURLRequest default timeoutInterval time is 60 secs

IOS Rocks
  • 2,127
  • 2
  • 21
  • 24
16

The default cache policy is NSURLRequestUseProtocolCachePolicy and the default timeout interval is 60 seconds.

NSURLRequest Class Reference

tonyspiff
  • 161
  • 1
  • 3
  • In document (provided in the link) the sentence is not available. @tonyspiff – Premal Khetani Feb 09 '17 at 10:34
  • @PremalKhetani The information about the default cache policy and timeout interval can be found in the documentation for the `requestWithURL:` method, which is listed at the link posted in the answer. – Burcea Bogdan Madalin May 24 '23 at 16:23
8

Maybe you can do a small test then you would konw:enter image description here

无夜之星辰
  • 5,426
  • 4
  • 25
  • 48
2

FYI - the interval changed with iOS 6.0 from 240 to 60.

https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414063-timeoutinterval?language=objc

Dave
  • 71
  • 5
1

For reference, the default timeout interval is defined within the header file for NSURLRequest, by the side of +requestWithURL:

NSURLRequest timeoutInterval

It explicitly says it's 60 seconds.

Alejandro Iván
  • 3,969
  • 1
  • 21
  • 30