Next Page > Hide TOC

NSHTTPURLResponse Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/Foundation.framework
Availability
Available in Mac OS X v10.2 with Safari 1.0 installed.
Available in Mac OS X v10.2.7 and later.
Companion guide
Declared in
NSURLResponse.h

Overview

An NSHTTPURLResponse object represents a response to an HTTP URL load request. It’s a subclass of NSURLResponse that provides methods for accessing information specific to HTTP protocol responses.

Adopted Protocols

NSCoding
NSCopying

Tasks

Getting HTTP Response Headers

Getting Response Status Code

Class Methods

localizedStringForStatusCode:

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

+ (NSString *)localizedStringForStatusCode:(NSInteger)statusCode

Parameters
statusCode

The HTTP status code.

Return Value

A localized string suitable for displaying to users that describes the specified status code.

Availability
See Also
Declared In
NSURLResponse.h

Instance Methods

allHeaderFields

Returns all the HTTP header fields of the receiver.

- (NSDictionary *)allHeaderFields

Return Value

A dictionary containing all the HTTP header fields of the receiver. By examining this dictionary clients can see the “raw” header information returned by the HTTP server.

Availability
Declared In
NSURLResponse.h

statusCode

Returns the receiver’s HTTP status code.

- (NSInteger)statusCode

Return Value

The receiver’s HTTP status code.

Availability
See Also
Declared In
NSURLResponse.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.