I am trying to pass access token in Alamofire
but getting confuse in various methods around web.
Below are methods which we need to use.
I'm using look like this :-
let username = "Tuser"
let password = "Tpassword"
let credentialData = "\(username):\(password)".data(using: String.Encoding.utf8)!
let base64Credentials = credentialData.base64EncodedString(options: [])
let headers = ["Authorization": "Basic \(base64Credentials)"]
OR
let headers = [ "Authorization" : token ]