NSURLErrorDomain Code=-1001 error when a http post request is sent

后端 未结 5 2152
慢半拍i
慢半拍i 2021-01-17 14:48

I am using the following code to post an image to my server.

@IBAction func postButtonPressed(sender: UIButton) {
    let task = NSURLSession.sharedSession(         


        
5条回答
  •  深忆病人
    2021-01-17 15:25

    Well, in my case simply increasing the timeout of request solved the problem.

提交回复
热议问题