<!--
{
  "availability" : [
    "macOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURLDownloadDelegate/download(_:didReceive:)-817z3",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSURLDownloadDelegate(im)download:didReceiveResponse:"
  },
  "title" : "download(_:didReceive:)"
}
-->

# download(_:didReceive:)

Sent when a download object has received sufficient load data to construct the NSURLResponse object for the download.

```
optional func download(_ download: NSURLDownload, didReceive response: URLResponse)
```

## Parameters

`download`

The URL download object sending the message.

`response`

The URL response object received as part of the download. `response` is immutable and will not be modified after this method is called.

## Discussion

In some rare cases, multiple responses may be received for a single download. In this case, the client should assume that each new response resets the download progress to 0 and should check the new response for the expected content length.

---

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)