我试图在这个pugin cordova-plugin-advanced-setServerTrustMode中使用‘http’,但是我得到了错误的Property 'setServerTrustMode' does not exist on type 'HTTP'.
我使用的是"cordova-plugin-advanced-http":"^2.4.0“和”@I native/http“:"^4.20.0",
我已经尝试从构造函数中移除'http‘,但仍然不起作用。
以下是我的代码
import { HTTP } from '@ionic-native/http';
constructor(private http: HTTP)
{}
public test(){
this.http.setServerTrustMode('nocheck', function () {
console.log('success!');
}, function () {
console.log('error :(');
});
}
如何解决这个问题?
发布于 2020-02-04 21:56:26
https://stackoverflow.com/questions/59981775
复制相似问题