Alamofire custom parameters

落爺英雄遲暮 提交于 2019-12-02 00:52:27
let headers:HTTPHeaders = ["Authorization": "Bearer " + token2Save]
let moreheaders:Parameters = ["Dropbox-API-Arg": ["path":sourcePath]]

Alamofire.request("https://content.dropboxapi.com/2/files/download", parameters: moreheaders, encoding: URLEncoding(destination: .queryString), headers: headers).responseJSON { feedback in
        guard feedback.result.value != nil else {
            print("Error: did not receive data", print("request \(request) feedback \(feedback)"))
            return

URLEncoding(destination: .queryString), headers: headers).responseJSON

Replace responseJSON with responseString and check your response from webservice.. it will lead to get the error line.

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