我正在使用 Alamofire 3 并遇到了这个问题:
[Result]: FAILURE: Error Domain=NSURLErrorDomain Code=-1007 "too many HTTP redirects" UserInfo={NSUnderlyingError=0x15eb422d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1007 "(null)"}, NSErrorFailingURLStringKey=URL omitted, NSErrorFailingURLKey= URL omitted, NSLocalizedDescription= too many HTTP redirects}
调用此方法时:
upload(.POST, kTaskSubmitImageUrl, multipartFormData: { multipartFormData in
multipartFormData.appendBodyPart(data: result, name: "uploaded")
},
encodingCompletion:{ encodingResult in
switch encodingResult
{
case .Success(let upload, _, _):
upload.responseJSON{
responseData in
debugPrint(responseData)
}
case .Failure(let errorStatus) :
debugPrint(errorStatus)
}
}
)
有人知道这是怎么回事吗?我应该看看我的服务器吗?