【发布时间】:2020-08-25 14:54:20
【问题描述】:
我一直在为我的 nativescript 应用程序使用带有 fetch API 的 http 并且它一直在工作,我的网址是 http://saved-proficiencies.000webhostapp.com/
现在我必须将网址更改为 https://www.mirrackle.com/
我遇到的问题是,每当我使用 https://www.mirrackle.com/ 时,都会出现此错误 -
网络请求失败。
当我使用http://www.mirrackle.com 时,它说页面已永久移动到https://www.mirrackle.com/
这是我的代码
var url = "https://www.mirrackle.com/backend/login.php?email=" +
encodeURIComponent(this.get("email")) + "&password=" +
encodeURIComponent(this.get("password"));
fetch(url).then((response) => response.text()).then((res) => {
alert(res);
}).catch((e) => {
console.log(e);
});
【问题讨论】:
-
我不乐意通过 GET 发送未加密的用户 ID 和密码
标签: javascript android nativescript