Options
@objc public class Options: NSObject
The Options class represents options for configuring the
timeout and retry behavior of a network request.
-
The timeout length of the connection in seconds. Default value is 20.
Declaration
Swift
public private(set) var connectionTimeoutLength: Int -
The timeout length of the request in seconds. Default value is 60.
Seealso
URLRequest.timeoutIntervalDeclaration
Swift
public private(set) var timeoutLength: Int -
The number of times a request should be retried if an error occurs. Default Value is 1.
Declaration
Swift
public private(set) var numberOfRetries: Int -
Initializes an
Optionsobject with default values.Declaration
Swift
public override init() -
Initializes an
Optionsobject with the given values.Declaration
Swift
public init(connectionTimeoutLength: Int, timeoutLength: Int, numberOfRetries: Int)Parameters
connectionTimeoutLengthThe connection timeout length.
timeoutLengthThe request timeout length.
numberOfRetriesThe number of times the request should be retried.
Options Class Reference