Instance Method

valueForHTTPHeaderField:

Returns the value that corresponds to the given header field.

Declaration

- (NSString *)valueForHTTPHeaderField:(NSString *)field;

Parameters

field

The name of the header field you want to retrieve. The name is case-insensitive.

Return Value

The value associated with the given header field, or nil if no value is associated with the field.

Discussion

In keeping with the HTTP RFC, HTTP header field names are case-insensitive.

See Also

Getting HTTP Response Headers

allHeaderFields

All HTTP header fields of the response.