I already have successfully got keychain for my token and passing it to AccessTokenAdapter class shown below. http127.0.0.1:8000/api2/projects/?format=json is passed as proj
Just solved. Looks like it's required to set httpmethod beforehand.
let url = URL(string: "http://127.0.0.1:8000/api2/projects/?format=json")
var urlRequest = URLRequest(url:url!)
urlRequest.httpMethod = HTTPMethod.get.rawValue
urlRequest.addValue("JWT \(self.keychain["token"]!)", forHTTPHeaderField: "Authorization")
urlRequest.addValue("application/json", forHTTPHeaderField: "Accept")
Alamofire.request(urlRequest)
.responseJSON { response in
debugPrint(response)
}