<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURLRequest/init(url:)-7dmpd",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURLRequest(im)initWithURL:"
  },
  "title" : "init(url:)"
}
-->

# init(url:)

Creates a URL request for a specified URL.

```
convenience init(url URL: URL)
```

## Parameters

`URL`

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`](/documentation/Foundation/NSURLRequest/CachePolicy-swift.enum/useProtocolCachePolicy)), and the default timeout interval (60 seconds).

---

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)