Reputation: 1948
I'm updating Alamofire to 4.0.0 Beta 1 and XCode 8 to Beta 6. First, I got [String:String] is not convertible to [String : Any]
error with this code
let parameter = [
"scope":"\(scope)",
"client": "\(clientId)"
]
Alamofire.request(link, withMethod: .POST, parameters: parameter, encoding: .json).responseJSON
and after I change add [String:Any] to parameter, the error gone but create new error : Expression type 'Request' is ambiguous without more context
let parameter:[String:Any] = [
"scope":"\(scope)",
"client": "\(clientId)"
]
Upvotes: 3
Views: 820
Reputation: 1948
turns out methods are now lower case, so use .post
instead of .POST
https://github.com/Alamofire/Alamofire/issues/1423
Upvotes: 3