当我向服务器发送请求时(https://) 应我的要求,我取消并出现以下错误:
# 发现扩展名时遇到的错误:错误Domain = PlugInKit代码= 13“查询已取消” UserInfo = {NSLocalizedDescription =查询已取消} #
我的代码:
Alamofire.upload(multipartFormData: {multipartFormData in
for (key,value) in multipartValue {
multipartFormData.append(value, withName: key, fileName: "image.png", mimeType: "image/png")
}
for (key, value) in body {
multipartFormData.append( Data(String(value).utf8), withName: key)
}
multipartFormData.contentType = "multipart/form-data; boundary=\(boundary)"
}, usingThreshold: UInt64.init(), to: url,headers: headers, encodingCompletion: { (encodingResult) in
if showIndicator {
self.lottiloading.stopAnimation()
}
switch encodingResult {
case .success(let upload, _, _):
upload.responseString(completionHandler: { (response) in
self.handlerRequest(response: response,callback)
})
case .failure(let error):
print(error)
}
})