I have migrated my project to Swift 3 (and updated Alamofire to latest Swift 3 version with pod 'Alamofire', '~> 4.0'
in the Podfile).
I now get an "Extra argument in call" error on every Alamofire.request. Eg:
let patientIdUrl = baseUrl + nextPatientIdUrl
Alamofire.request(.POST, patientIdUrl, parameters: nil, headers: nil, encoding: .JSON)
Can anybody tell me why ?
My solution is if you are using headers, its type must be [String:String].
According to Alamofire documentation for version 4.0.0 URL request with HTTP method would be followings:
So your url request will be:
and a sample request will be:
Hope this helps!