0
When making requests to the server used the following code
let URL = Foundation.URL(string: "http:....")!
let mutableURLRequest = NSMutableURLRequest(url: URL)
mutableURLRequest.httpMethod = "POST"
let parameters = ["UserName": "Teste"]
do{
mutableURLRequest.httpBody = try JSONSerialization.data(withJSONObject: parameters, options: JSONSerialization.WritingOptions())
}catch{}
mutableURLRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
Alamofire.request("https").responseJSON{response in....}
Now with the migration to Swift 4 I’ve tried the codes that are in the library document and tried other options that several users give both here and in forums and I usually have the same error that is the following "Extra argument in call"
Someone with the same problem and who I have managed to reach the solution can help me?
Would not be
Alamofire.request(mutableURLRequest).responseJSON{response in....}
?– Rici