我正在尝试POST
使用 alamofire 发送请求。但应要求我一直收到此错误:
assertionFailure("needNewBodyStream did not find UploadRequest.")
Alamofire/SessionDelegate.swift, line 178
2020-12-09 16:48:32.746737+0330 Dericoin[29553:862552] Fatal error: needNewBodyStream did not find UploadRequest.: file Alamofire/SessionDelegate.swift, line 178
我的请求 :
let paramsDict: [String: Any]? = [...]
let headersDict: [String: Any]? = [...]
AF.request("https://....", method: .post, parameters: paramsDict, encoding: URLEncoding.default, headers: headersDict)
.responseJSON { response in
//something
}
我正在使用Alamofire v5.4
并且还测试了 v5.2 和 v5.3;iOS 14
和Swift 5
。有什么建议吗?