How to pass access token to Alamofire?
<p>I am trying to pass access token in <code>Alamofire</code> but getting confuse in various methods around web.</p>

<p>Below are methods which we need to use. </p>

<pre><code>let todosEndpoint: String = "https:url......."

let headers = [
            "Authorization": "Bearer \(token!)",
            "Content-Type": "application/X-Access-Token"
        ]
        let Auth_header    = [ "Authorization" : tokenString! ]

        Alamofire.request(todosEndpoint, method: .get, parameters: nil, encoding: JSONEncoding.default, headers: Auth_header)
            .responseJSON { response in
                print("response.request \(response.request)")  // original URL request
                print("response.response \(response.response)") // HTTP URL response
                print("response.data \(response.data)")     // server data
                print("response.result \(response.result)")

                print("response \(response)")

        }

    }
</code></pre>

<p>OR</p>

<pre><code>let aManager = SessionManager()
        aManager.session.configuration.httpAdditionalHeaders = [
            "Authorization": "Bearer tokenString"]
</code></pre>

<p>OR</p>

<pre><code>let headerss = [
            "Authorization": tokenString]
</code></pre>

<p>OR</p>

<pre><code>let aManager = SessionManager()
            aManager.session.configuration.httpAdditionalHeaders = [
                "Authorization": "Basic tokenString"]
</code></pre>

<p>What is proper way to pass access token?</p>