我处理 JavaScript 应用程序,该应用程序在 https://localhost:63342/WalletClient/index.html_ijt=k4ock08pqsve8hb7b2b34ou3h5 的localhost地址中打开 . 看起来像这样,
单击余额按钮时,它应执行以下 Ajax GET 请求并尝试打开新页面 balance.html ,
$("#balance").click(function () {
address = $('#address option:selected').text().trim();
selectedCurrency = $('#selectCurrency option:selected').text().trim();
// make sure in the backend the currency name samll/capital doesnt matter
$.ajax({
url: "https://www.hostdomain.com" + "/rest/wallet/addressAndCurrency" + "/" + selectedCurrency + "/" + address,
type: "GET",
dataType: "json",
success: function (data) {
var id = data["id"];
window.open("/WalletClient/balance.html?walletId=" + id);
},
failure: function (errMsg) {
console.log(errMsg.toString())
}
});
});
但是,在控制台中,我收到 Failed to load resource: the server responded with a status of 404 (Not Found) 的消息,它似乎尝试从 :63342/WalletClient/https://www.hostdomain.com/rest/wallet/addressAndCurrency/Bitcoin/mnV3CR6435p1LKcbGa8GVwt9euWrf3wWEX 的URL接收 GET 请求
我工作的Java应用程序未部署,因此无法提供任何响应 . 但是,我担心的是 GET 请求应该尝试从 https://www.hostdomain.com/rest/wallet/addressAndCurrency/Bitcoin/mnV3CR6435p1LKcbGa8GVwt9euWrf3wWEX 的URL中接收 JSON ,这不是试图做的 .
这是什么问题?