Extra argument 'method' in call

前端 未结 15 1688
你的背包
你的背包 2020-12-16 08:59

Getting error while calling Alamofire request method in the latest version(4.0.0).

The syntax is:

Alamofire.request(urlString,method: .post, parame         


        
15条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 09:28

    It means that some of the parameters type are wrong, check that you are sending these values:

    url: String
    method: HTTPMethod  (E.g: .post)
    parameters: [String:Any]
    encoding: ParameterEncoding  (E.g: JSONEncoding.default)
    headers: [String: String]
    

提交回复
热议问题