我正在尝试在此 pugin cordova-plugin-advanced-http 中使用“setServerTrustMode”,但出现错误Property 'setServerTrustMode' does not exist on type 'HTTP'.
我正在使用“cordova-plugin-advanced-http”:“^2.4.0”和“@ionic-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 :(');
});
}
如何解决这个问题?