7

In my angular2 app I making a HTTPS post request to the API:

this.http.post('https://myhost.com/api/users/sign_in', body, { headers: contentHeaders })
      .subscribe(
      response => {.....

And I am getting "failed to load resource: net::ERR_INSECURE_RESPONSE"

Everything was fine with HTTP until I switched to HTTPS.

I am using self signed certificate for myhost.com.

In browser I am able to accept the certificate and make a request to the API. Could I resolve this also to make an API request via http.post from angular2 directly?

Mirza Sisic
  • 2,401
  • 4
  • 24
  • 38
user1908375
  • 1,069
  • 1
  • 14
  • 33
  • Looks like a dup of http://stackoverflow.com/questions/23688565/failed-to-load-resource-neterr-insecure-response or http://stackoverflow.com/questions/28857340/err-insecure-response-handing-tips-in-javascript Doesn't look angular related. – Günter Zöchbauer Apr 14 '16 at 14:47
  • What does ssllabs.com says about your domain? – Tom Apr 15 '16 at 10:58
  • 1
    Possible duplicate of [Failed to load resource: net::ERR\_INSECURE\_RESPONSE](http://stackoverflow.com/questions/23688565/failed-to-load-resource-neterr-insecure-response) – Michael Freidgeim May 04 '17 at 07:01

0 Answers0