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

后端 未结 5 2110
慢半拍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:35

    It is late to reply but I recently face the error while running the new application assigned to me. The application is one of them whose URL Domains are blocked by the system administrator of my company.
    I ask them to allow me the URL access after which the response came and the application run perfectly.
    This may be not the actual solution for everyone but some of the developers may have the restricted environment can get help by this.

提交回复
热议问题