weixin_33737134 2018-09-20 11:53 采纳率: 0%
浏览 73

Google chrome删除Web Api

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?