【发布时间】:2017-07-26 13:06:45
【问题描述】:
我尝试在 ionic 2 中创建一个 http.get。它在 ios 上运行良好,但在 android 上却不行。
checkHTTP() {
console.log('checkHTTP');
return this.http.get('http://apiv3.iucnredlist.org/api/v3/version', {}, {})
.then((data) => {
console.log(data);
})
.catch((error) => {
console.log(error);
})
}
这是android中的结果:
Object {status: 500, error: "There was an error with the request"} 错误 : “请求出现错误” 状态 : 500
这里有一些来自 ionic 的信息
Cordova CLI: 7.0.1
Ionic Framework Version: 3.5.3
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 2.0.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.4
Xcode version: Not installed
【问题讨论】:
标签: android angular cordova ionic2