Extra argument 'method' in call

前端 未结 15 1721
你的背包
你的背包 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:19

    Almofire methods changed in Swift 3 as the following:

    1. Reorder parameters (url then method type).
    2. Change Encoding Enum to be "JSONEncoding.default" for example.

提交回复
热议问题