Ionic framework Ionic 2与HTTPS服务器通信

Ionic framework Ionic 2与HTTPS服务器通信,ionic-framework,https,ionic2,Ionic Framework,Https,Ionic2,我有一个正在运行的ionic 2应用程序(运行于2.0.0-beta.4),它使用HTTPPOST与我的服务器进行通信 loginService(userID, pwd, userIpAddress){ var body = 'userID=' +userID+"&pwd="+pwd+"&userIpAddress="+userIpAddress+''; var headers = new Headers(); headers.append('Conte

我有一个正在运行的ionic 2应用程序(运行于2.0.0-beta.4),它使用HTTPPOST与我的服务器进行通信

loginService(userID, pwd, userIpAddress){

    var body = 'userID=' +userID+"&pwd="+pwd+"&userIpAddress="+userIpAddress+'';
    var headers = new Headers();
    headers.append('Content-Type', 'application/x-www-form-urlencoded');
    var url = 'http://localhost/WS/login.asmx';

    return this.http.post(url,body, {headers: headers}).map(res => res.json());
  }
我如何将其转换为HTTPS POST, 如果服务器只接受HTTPS POST请求

如何插入自签名证书


我能找到的最接近的是

要插入您的自签名证书,您需要将您的应用程序标记为可调试。但是,这将使用户能够查看控制台日志

要将您的应用程序标记为可调试,请在清单文件中添加此行
android:debuggable=“true”


自签名证书不能在生产中使用。在Android调试模式下,您可以使用它而无需插入it@e666,假设我有证书,问题是如何实现https请求?只需使用
https://localhost/WS/login.asmx
而不是
http://localhost/WS/login.asmx
@e666,我不需要导入一些证书或smth吗?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application android:icon="@drawable/icon"
        android:debuggable="true">
      ...
    </application>
</manifest