# NSURLResponse documentation

Software documentation for the NSHTTPURLResponse class
Foundation/NSURLResponse.h
HTTP specific additions to an NSURLResponse
localizedStringForStatusCode:
statusCode
Returns a string representation of a status code.
allHeaderFields
Returns a dictionary containing all the HTTP header fields.
statusCode
Returns the HTTP status code for the response.
Software documentation for the NSURLResponse class
Foundation/NSURLResponse.h
NSCoding
NSCopying
The response to an NSURLRequest
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
MIMEType
Returns the receiver's MIME type.
URL
Returns the receiver's URL.
expectedContentLength
Returns the expected content length of the receiver or -1 if there is no idea of what the content length might be.
This value is advisory, not a definitive length.
initWithURL:
URL
MIMEType:
MIMEType
expectedContentLength:
length
textEncodingName:
name
Initialises the receiver with the URL, MIMEType, expected length and text encoding name provided.
suggestedFilename
Returns a suggested file name for storing the response data, with suggested names being found in the following order:
content-disposition header
last path component of URL
host name from URL
'unknown'
If possible, an extension based on the MIME type of the response is also appended.
The result should always be a valid file name.
textEncodingName
Returns the name of the character set used where response data is text