im using vscode to use a web api, and using the method get it works perfectly, but when i use Delete it gives an error. That error only appears with google chrome because with IE it works.
Here is the code: function ApagarItem(value) { var settings = { "url": "the link", "method": "DELETE", } $.ajax(settings).done(function (response) { console.log(response); }); }
For the get code to work i had to add an extension in chrome to enable cross-origin resource sharing
The errors are the following:
OPTIONS "The Link" 405 (Method Not Allowed) Failed to load "The Link": Response for preflight does not have HTTP ok status.