NSURLRequest timeout interval default time
Asked Answered
L

5

13

Can you share your answer to me for

  1. NSURLRequest default timeoutInterval time
  2. NSMutableURLRequest default timeoutInterval time
Lawerencelawes answered 29/5, 2014 at 13:24 Comment(3)
The default time is 240 seconds.Toffic
@Guy Kogus for NSMutableURLRequest post method default time is 240 sec what about NSURLRequest default timeoutInterval time ?Lawerencelawes
Sorry, it's 60 seconds. You can test it easily by just creating a simple NSURLRequest object and logging the timeout interval.Toffic
L
20

For both NSURLRequest & NSMutableURLRequest default timeoutInterval time is 60 secs

Lawerencelawes answered 2/7, 2014 at 9:41 Comment(0)
J
16

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

NSURLRequest Class Reference

Jollanta answered 31/1, 2015 at 15:54 Comment(2)
In document (provided in the link) the sentence is not available. @JollantaPestana
@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.Bannockburn
E
8

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

Egesta answered 27/2, 2017 at 3:37 Comment(0)
I
2

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

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

Ibanez answered 5/1, 2019 at 16:26 Comment(0)
H
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.

Helsie answered 5/6, 2017 at 16:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.