Contents

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

  • URL:

    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