httpAdditionalHeaders
httpAdditionalHeaders is a property of URLSessionConfiguration in the Foundation framework. It holds a dictionary of additional HTTP header fields that URLSession should attach to every request made with a session configured with this object. If no value is set, default headers are used.
You set it before creating a URLSession. For example: let config = URLSessionConfiguration.default; config.httpAdditionalHeaders = ["Authorization": "Bearer token",
If a request provides its own header with the same field name, the request’s header value takes
This feature is useful for applying headers consistently across requests, such as authorization tokens, custom user-agent