jQuery.ajax({
url: "https://SomeWallet/payment-requests/",
type: "POST",
dataType: "json",
headers: { "Content-Type": "application/x-www-form-urlencoded",
"X-Api-Key": "XXXX",
"X-Auth-Token": "XXXX",
"Access-Control-Allow-Origin": "*",
"Access-Control-Request-Headers":"x-requested-with"
},
crossDomain: true,
data: {
"some": "sum",
"buyer_name": "mike",
"purpose": "iphone7",
"redirect_url": "https://www.onlineshopping.com",
"phone": "12345",
"email": "foo@example.com"
},
success: function(data) {
console.info(data);
}
});
},
我收到以下错误:
XMLHttpRequest无法加载https://SomeWallet/payment-requests/。预检的响应具有无效的HTTP状态代码401