<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLRequest/init(url:cachePolicy:timeoutInterval:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation10URLRequestV3url11cachePolicy15timeoutIntervalAcA3URLV_So017NSURLRequestCacheE0VSdtcfc"
  },
  "title" : "init(url:cachePolicy:timeoutInterval:)"
}
-->

# init(url:cachePolicy:timeoutInterval:)

Creates and initializes a URL request with the given URL, cache policy, and timeout interval.

```
init(url: URL, cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy, timeoutInterval: TimeInterval = 60.0)
```

## Parameters

`url`

The URL for the request.

`cachePolicy`

The cache policy for the request. The default is [`NSURLRequest.CachePolicy.useProtocolCachePolicy`](/documentation/Foundation/NSURLRequest/CachePolicy-swift.enum/useProtocolCachePolicy).

`timeoutInterval`

The timeout interval for the request. The default is `60.0`. See the commentary for the [`timeoutInterval`](/documentation/Foundation/NSURLRequest/timeoutInterval) for more information on timeout intervals.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)