I'm trying to add headers into AlamoFire requests.
It works well when I use the following code:
let manager = Manager.sharedInstance
manager.session.configuration.HTTPAdditionalHeaders = [
"Authorization": "Bearer \(accessToken!)" ]
However, when I need to user an ephemeral session it does not work with the following code.
let configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration()
let manager = Manager(configuration: configuration)
manager.session.configuration.HTTPAdditionalHeaders = [
"Authorization": "Bearer \(accessToken!)" ]
Am I missing something?
Thanks in advance,