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

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.


In my case issue was in 3rd party library - FirebasePerformance. Bug report URL: https://github.com/firebase/firebase-ios-sdk/issues/486


Apparently my post request was getting a timeout error since I was sending an image that the server would find too large. I scaled down the images in order to make my images acceptable by the server.

As this post suggests, NSURLErrorDomain Code=-1001 error might be caused by many things including;

  • Server response time limit
  • Server rules about the incoming data
  • Authentication problems

Hope that helps to other people