1

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.

Mourice
  • 597
  • 1
  • 5
  • 17

1 Answers1

1

The error states that -The resource you are trying to access is not found.

This can happen due to many reasons, some possible one's are -

Naresh
  • 334
  • 1
  • 4
  • 17
  • As I stated api works if I remove port 443 from url. Then still you think its a content type issue? Because I have tried many of fhem already – Mourice Sep 17 '17 at 19:10