我正在尝试使用Alamofire在Swift中进行带头部的POST请求。但是,我一直收到“方法调用中的额外参数”错误。我正在使用Alamofire 4.5版。我无法找出错误所在。
请参见附加的代码。
请参见附加的代码。
let headers = ["Authorization": token, "Content-Type": "application/json"]
Alamofire.request("http://localhost:8000/create", method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: headers).responseJSON { response in
}