$.ajax(api, {
crossDomain: true
success: (data)=>{
console.log(data);
},
});
fetch(api, {
mode: "cors",
});
queryPromise.then((response)=>{
console.log(data);
})
Allow-Control-Allow-Origin: *
processData: false
в параметры вашего ajax-запроса.$.ajax({
type: "POST",
url: api_url,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
processData: false,
data: JSON.stringify(pd),
success: function (result) {
// ...
}
});