Extra argument 'method' in call of Alamofire

喜欢而已 提交于 2019-12-01 10:42:59

Change parameters type to [String : Any] as follow:

let parameters = [
                "name": username,
                "mobile": "",
                "email": email,
                "password": "",
                "blood_donor": "0",
                "registration_id": defaults.string(forKey: "FCMToken"),
                "platform": platform,
                "appID": "3"
            ] as [String : Any]

Not necessary: Remove encoding: URLEncoding() from param arguments, it may work without encoding.

Here is discussion on same issue and resolution by Alamofire developer: https://github.com/Alamofire/Alamofire/issues?utf8=%E2%9C%93&q=extra%20argument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!