Class

NSHTTPURLResponse

The metadata associated with the response to an HTTP protocol URL load request.

Overview

The NSHTTPURLResponse class is a subclass of NSURLResponse that provides methods for accessing information specific to HTTP protocol responses. Whenever you make HTTP URL load requests, any response objects you get back from the NSURLSession, NSURLConnection, or NSURLDownload class are instances of the NSHTTPURLResponse class.

Topics

Initializing a Response Object

initWithURL:statusCode:HTTPVersion:headerFields:

Initializes an HTTP URL response object with a status code, protocol version, and response headers.

Getting HTTP Response Headers

allHeaderFields

All HTTP header fields of the receiver.

Getting Response Status Code

localizedStringForStatusCode:

Returns a localized string corresponding to a specified HTTP status code.

statusCode

The receiver’s HTTP status code.

Relationships

Inherits From

See Also

Requests and Responses

NSURLRequest

A URL load request that is independent of protocol or URL scheme.

NSMutableURLRequest

A mutable URL load request that is independent of protocol or URL scheme.

NSURLResponse

The metadata associated with the response to a URL load request, independent of protocol and URL scheme.