“too many HTTP redirects” while using Alamofire Upload Multipart Form Data

后端 未结 1 1108
既然无缘
既然无缘 2021-01-23 07:29

I\'m using Alamofire 3 and encountered this:

[Result]: FAILURE: Error Domain=NSURLErrorDomain Code=-1007 \"too many HTTP redirects\" UserInfo={NSUnderlyingError=         


        
相关标签:
1条回答
  • 2021-01-23 08:04

    it turns out that in iOS 9, there's this App Transport Security (ATS) to enforce best practices in secure connections between an app and its back end. Hence the redirect issues.

    by adding Alamofire.Manager.sharedInstance.delegate.taskWillPerformHTTPRedirection = nil

    everything works like magic XD

    Cheers

    Des

    0 讨论(0)
提交回复
热议问题