I have simple a html page with form. When I do POST request then receive failed, but it not response from server. What I do wrong?
function createRequest(url, body) {
var response;
console.log(JSON.stringify(body)); // (1)
$.ajax({
url: "creation/" + url,
type: "POST",
async: false,
contentType: 'application/json',
data: JSON.stringify(body),
success: function (data) {
if (data.status == true) {
response = data.response;
} else {
BootstrapDialog.show({
title: 'Error',
message: data.errorMessage
});
}
}
});
return response;
}
Body (1)
{"name":"Test UI","bid":"2","budget":"20"}
When I do this request via POSTMAN all work fine.
Error appaear in Chroome Version 57.0.2987.98 (64-bit), but in Edge all works fine