我无法访问要发布到的服务器。结果我得到了
XMLHttpRequest cannot load http://worldcuppool.local:2490/token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:58402' is therefore not allowed access
错误。
我的帖子请求是:
$.ajax({
url: 'http://worldcuppool.local:2490/token',
type: "POST",
dataType: "json",
data: 'grant_type=password&username=Alex&password=pswrd',
success: function (data, textStatus, jqXHR) { alert("success"); },
error: function (jqXHR, textStatus, errorThrown) {
console.log(jqXHR);
alert("failure");
}
});
锄头从服务器得到响应?