我有一个可以工作的离子2应用程序(运行在2.0.0-beta.4),上,它使用HTTP 与我的服务器通信。
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?
如何插入自签名证书?
我能找到的最接近的是Node.JS HTTPS
发布于 2016-12-15 01:16:51
要插入自签名证书,需要将应用程序标记为可调试器。但是,这将使用户能够查看控制台日志。
若要将应用程序标记为可调试器,请在清单文件中添加以下行android:debuggable="true"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<application android:icon="@drawable/icon"
android:debuggable="true">
...
</application>
</manifesthttps://stackoverflow.com/questions/39974685
复制相似问题