---
title: response
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlsessiontask/response
---

# response

The server’s response to the currently active request.

## Declaration

```swift
@NSCopying var response: URLResponse? { get }
```

## Mentioned in

Downloading files from websites

## Discussion

Discussion This object provides information about the request as provided by the server. This information always includes the original URL. It may also include an expected length, MIME type information, encoding information, a suggested filename, or a combination of these.

## See Also

### Obtaining general task information

- [currentRequest](foundation/urlsessiontask/currentrequest.md)
- [originalRequest](foundation/urlsessiontask/originalrequest.md)
- [taskDescription](foundation/urlsessiontask/taskdescription.md)
- [taskIdentifier](foundation/urlsessiontask/taskidentifier.md)
- [error](foundation/urlsessiontask/error.md)
