So I have to make a query to an API via $.ajax
. I have tons of those queries in my website, all respecting the same pattern.
I only have one that doesn't want to fire and I really don't understand why.
Here is the code of my function :
static create(handleResponse) {
console.log('starting creating product');
let settings = {
"url": apiURL + "/relsalesorderproducts/",
"method": "POST ",
"headers": {
"token": localStorage.getItem('ms-token'),
"Content-Type": "application/x-www-form-urlencoded",
}
};
$.ajax(settings).done(function (response) {
console.log('created product');
handleResponse(response);
});
}
I don't see the log 'created product' in the console, I do see the 'starting creating product' log but I don't even see the request being made in the Network section of Developer tools like I do on every other requests, just nothing.
What do you guys think could cause that?