wymsee / cordova-HTTP

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
372 stars 302 forks source link

Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: not found (404)" #150

Open mourice opened 6 years ago

mourice commented 6 years ago

I am using CordovaHttp Plugin for making API calls in my Cordova application based on angular1. I am using the following URL to make the post request for Authentication with username and password as params.

https://xxxx.xxxx.com:443/xxx/v3/xxx/Authentication/signin Everything works fine when making a request in android and also with the Postman. But when I make the same request on ios it fails with the following error:

Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: not found (404)" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x60800002e160> { URL: https://xxxx.xxxx.com:443/xxx/v3/xxx/Authentication/signin } { status code: 404, headers { "Content-Length" = 817; "Content-Type" = "text/html"; Date = "Sun, 17 Sep 2017 15:37:12 GMT"; Server = "Microsoft-IIS/8.0"; } }, NSErrorFailingURLKey=https://xxxx.xxxx.com:443/xxx/v3/xxx/Authentication/signin If I remove the port 443 from above url everything works fine. I dont know why this is happening with iOS ang how to resolve this issue.

I want to use the port no because my application works with different server configuration with different port number depending on the client.