XMLHttpRequest cannot load http://192.168.1.134:8888/pivot/api/report/uploadReport. Response for preflight has invalid HTTP status code 404
I am getting this error. Is anyone has an idea?
var settings = {
"async": true,
"crossDomain": true,
"url": baseURL + "report/uploadReport",
"method": "POST",
"headers": {
"token": window.localStorage['token']
},
"data": {
"rating": rating,
"desc": desc,
"spot_id": window.localStorage['spotId'],
"image_name": path
}
};
console.log(settings);
$.ajax(settings).done(
function(response) {
console.log(response);
}
);
This is code part to call ajax. Thanks