Alamofire Request error only on GET requests

本小妞迷上赌 提交于 2019-12-04 09:29:40

You're encoding the parameters as JSON in the body of the request, try encoding the parameters in the URL by changing the encoding to URL:

return Alamofire.request(.GET, urlString, parameters: parameters, encoding: .URL, headers: headers)

As this is the default behavior, you can simply remove it:

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