Up
Authors
- Generated by richard
-
- Declared in:
- Foundation/NSURLResponse.h
Availability: MacOS-X 10.2.0, Base 1.13.0
HTTP specific additions to an NSURLResponse
Method summary
+ (
NSString*)
localizedStringForStatusCode: (int)statusCode;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns a string representation of a status code.
- (
NSDictionary*)
allHeaderFields;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns a dictionary containing all the HTTP header
fields.
- (int)
statusCode;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the HTTP status code for the response.
- Declared in:
- Foundation/NSURLResponse.h
- Conforms to:
- NSCoding
- NSCopying
Availability: MacOS-X 10.2.0, Base 1.13.0
The response to an NSURLRequest
Method summary
- (
NSString*)
MIMEType;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the receiver's MIME type.
- (
NSURL*)
URL;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the receiver's URL.
- (long long)
expectedContentLength;
Availability: MacOS-X 10.2.0, Base 1.13.0
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.
- (id)
initWithURL: (
NSURL*)URL
MIMEType: (
NSString*)MIMEType
expectedContentLength: (int)length
textEncodingName: (
NSString*)name;
Availability: MacOS-X 10.2.0, Base 1.13.0
Initialises the receiver with the
URL, MIMEType, expected
length and text encoding name
provided.
- (
NSString*)
suggestedFilename;
Availability: MacOS-X 10.2.0, Base 1.13.0
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.
- (
NSString*)
textEncodingName;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the name of the character set used where
response data is text
Up