---
title: "download(_:didReceive:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsurldownloaddelegate/download(_:didreceive:)-817z3"
---

# download(_:didReceive:)

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

## Declaration

```swift
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

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.

## See Also

### Download Data and Responses

- [download(_:decideDestinationWithSuggestedFilename:)](foundation/nsurldownloaddelegate/download(_:decidedestinationwithsuggestedfilename:).md)
- [downloadDidBegin(_:)](foundation/nsurldownloaddelegate/downloaddidbegin(_:).md)
- [download(_:didCreateDestination:)](foundation/nsurldownloaddelegate/download(_:didcreatedestination:).md)
- [download(_:didReceiveDataOfLength:)](foundation/nsurldownloaddelegate/download(_:didreceivedataoflength:).md)
- [download(_:shouldDecodeSourceDataOfMIMEType:)](foundation/nsurldownloaddelegate/download(_:shoulddecodesourcedataofmimetype:).md)
- [download(_:willResumeWith:fromByte:)](foundation/nsurldownloaddelegate/download(_:willresumewith:frombyte:).md)
- [download(_:willSend:redirectResponse:)](foundation/nsurldownloaddelegate/download(_:willsend:redirectresponse:).md)
