ERR_INSECURE_RESPONSE

use*_*375 7 https angular

在我的angular2应用程序中,我向API发送了HTTPS发布请求:

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

我得到"无法加载资源:net :: ERR_INSECURE_RESPONSE"

一切都很好,HTTP直到我切换到HTTPS.

我正在为myhost.com使用自签名证书.

在浏览器中,我能够接受证书并向API发出请求.我可以通过http.postangular2直接解决这个问题吗?