Initializer

init(url:cachePolicy:timeoutInterval:)

Creates a URL request with the specified URL, cache policy, and timeout values.

Declaration

init(url URL: URL, cachePolicy: NSURLRequest.CachePolicy, timeoutInterval: TimeInterval)

Parameters

theURL

The URL for the request.

cachePolicy

The cache policy for the request.

timeoutInterval

The timeout interval for the request, in seconds.

Return Value

The initialized URL request.

Discussion

This is the designated initializer for NSURLRequest.

See Also

Creating Requests

init(url: URL)

Creates a URL request for a specified URL.