Sets a value for the header field.
- iOS 7.0+
- macOS 10.9+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
The new value for the header field. Any existing value for the field is replaced by the new value.
The name of the header field to set. In keeping with the HTTP RFC, HTTP header field names are case insensitive.
Certain header fields are reserved. Do not use this method to set such headers. Specifically, there is no need for you to set the
Content-Length header. See Reserved HTTP Headers.