我正在尝试从wizzair API获得一些回复(没有官方文档,我在开发工具中遇到了XHR)。
到目前为止,我确定有
网址https://be.wizzair.com/7.10.1/Api/search/search
和通过POST方法传递的对象有效负载以获取数据。
如何通过POST将对象传递给URL?
这是我给出404的尝试。
$.ajax({
method: "POST",
type: "json",
url: url+payload,
success: function (data) {
console.log(data);
}
,
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
},
});
另一个问题是
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.