Gets all header fields from a
- iOS 2.0+
- macOS 10.1+
- Mac Catalyst 13.0+
- tvOS 9.0+
The message to examine.
CFDictionary object containing keys and values that are
CFString objects, where the key is the header fieldname and the dictionary value is the header field’s value. Returns
NULL if the header fields could not be copied. Ownership follows the The Create Rule.
HTTP headers are case insensitive. To simplify your code, certain header field names are canonicalized into their standard form. For example, if the server sends a
content-length header, it is automatically adjusted to be
The returned dictionary of headers is configured to be case-preserving during the set operation (unless the key already exists with a different case), and case-insensitive when looking up keys.
For example, if you set the header
X-foo, and then later set the header
X-Foo, the dictionary’s key will be
X-foo, but the value will taken from the