Initializer

init(url:)

Creates a URL request for a specified URL.

Declaration

convenience init(url URL: URL)

Parameters

theURL

The URL for the request.

Return Value

The initialized URL request.

Discussion

The request is created with the with the default cache policy (NSURLRequest.CachePolicy.useProtocolCachePolicy), and the default timeout interval (60 seconds).

See Also

Creating Requests

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

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