---
title: expectedContentLength
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlresponse/expectedcontentlength
---

# expectedContentLength

The expected length of the response’s content.

## Declaration

```swift
var expectedContentLength: Int64 { get }
```

## Discussion

Discussion This property’s value is NSURLResponseUnknownLength if the length can’t be determined. Some protocol implementations report the content length as part of the response, but not all protocols guarantee to deliver that amount of data. Your app should be prepared to deal with more or less data.

## See Also

### Getting the response properties

- [suggestedFilename](foundation/urlresponse/suggestedfilename.md)
- [mimeType](foundation/urlresponse/mimetype.md)
- [textEncodingName](foundation/urlresponse/textencodingname.md)
- [url](foundation/urlresponse/url.md)
