When I made the requests to the server I 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 have already tried the codes that are in the library document and I have tried other options that several users are giving here and in forums and I usually always have the same error as the following "Extra argument in call "
Someone with the same problem and I have been able to reach the solution can help me?