I have updated to Xcode8, swift3 and Alamofire 4 and am now getting an error \'extra argument \'method\' in call\' on the below line beginning \'Alamofire.request\'
Instead of .json
for encoding, try JSONEncoding.default
.
Your paramters should be casted to: [String : Any]?
This is an issue with compiler which falsely report error for extra argument.
In the end, your line should look like this:
Alamofire.request(pulseVoteEndpoint, method: .post, parameters: pulseNewVote as [String : Any]?, encoding: JSONEncoding.default)
.response { request, response, data, error in
// rest of the code