<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.11.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURLDownload/init(request:delegate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURLDownload(im)initWithRequest:delegate:"
  },
  "title" : "init(request:delegate:)"
}
-->

# init(request:delegate:)

Returns an initialized URL download for a URL request and begins to download the data for the request.

```
init(request: URLRequest, delegate: (any NSURLDownloadDelegate)?)
```

## Parameters

`request`

The URL request to download. The `request` object is deep-copied as part of the initialization process. Changes made to `request` after this method returns do not affect the request that is used for the loading process.

`delegate`

The delegate for the download. This object will receive delegate messages as the download progresses. Delegate messages will be sent on the thread which calls this method. For the download to work correctly the calling thread’s run loop must be operating in the default run loop mode.

    The     `NSURLDownload`     class maintains a strong reference to this delegate object.

## Return Value

An initialized NSURLDownload object for `request`.

## See Also

[URL Loading System](/documentation/Foundation/url-loading-system)

Interact with URLs and communicate with servers using standard Internet protocols.



---

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)