Instance Property


A dictionary containing all of the HTTP header fields for a request.


var allHTTPHeaderFields: [String : String]? { get set }


Certain header fields are reserved (see Reserved HTTP Headers). Do not use this property to set such headers.

See Also

Accessing Header Fields

func addValue(String, forHTTPHeaderField: String)

Adds a value to the header field.

func setValue(String?, forHTTPHeaderField: String)

Sets a value for the header field.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software