---
title: "init(url:cachePolicy:timeoutInterval:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/urlrequest/init(url:cachepolicy:timeoutinterval:)"
---

# init(url:cachePolicy:timeoutInterval:)

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

## Declaration

```swift
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 doc://com.apple.foundation/documentation/Foundation/NSURLRequest/CachePolicy-swift.enum/useProtocolCachePolicy.
- `timeoutInterval`: The timeout interval for the request. The default is 60.0. See the commentary for the doc://com.apple.foundation/documentation/Foundation/NSURLRequest/timeoutInterval for more information on timeout intervals.
