http - 类型“HTTP”上不存在属性“setServerTrustMode”。(插件-高级-HTTP)
问题描述
我正在尝试在此 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 :(');
});
}
如何解决这个问题?
解决方案
推荐阅读
- vb.net - Crystal Reports 除以零,但有问题仅检查零以突出显示零
- javascript - React 无法使用 (props)=> 访问类外的 props 值
- python - 熊猫系列列表中的索引
- excel - 更改单元格颜色后获取 Excel 中活动单元格的先前格式(VBA)
- webpack - webpack:如何使用内联(base64)url 包含指向 css 文件的链接
- python - 如何使用 python openCV 在图像上放置徽标?
- vb.net - VB.NET - 以编程方式关闭图表数据对象
- dialogflow-es - 您可以强制 Dialogflow 提取日期时间实体而不是单独的日期和时间实体吗?
- java - Java 泛型方法定义
- firebase - Firebase 实时数据库