Extra argument 'method' in call

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

    You are getting that error because of the wrong data types.

    Parameters Type should be [String : Any] and parameters type shouldn't be an optional.

    Header Type should be [String : String] or nil and header type shouldn't be an optional as well.

    Hope it helps. :-)

提交回复
热议问题