axios.delete vs axios({method: 'delete' in Internet Explorer
See original GitHub issueHi, i have this piece of pseudo-code
axios.delete(`${url}`, {withCredentials: true, headers: {'uid': uid}})
and in IE10 doesn’t run but if i use
axios({
method: 'delete',
url: `${url}`,
data: null,
withCredentials: true,
headers: {'uid': uid},
params: {
}
All is done. In first case i have a body request “undefined” and server reject my call with “415 http code” response and “Body must have Content-Type application/json”: in first case infact it seems to have Content-Type: text/plain; charset=UTF-8, in second i force data to null and parameter to {} all work fine
What is wrong in first piece? Thanks in advance.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Axios React – How to Make Get, Post, and Delete API Requests
As the name implies, you use this to delete specific data from your endpoint/API as well as your UI – DELETE can handle...
Read more >Axios DELETE Requests - Mastering JS
Axios has a axios.delete() function that makes it easy to send an HTTP DELETE request to a given URL.
Read more >GET, POST , PUT , DELETE in Axios - DEV Community
Axios is a promise-based HTTP Client for node.js and the browser. ... try { await axios({ url: url, method: "DELETE", data: data, }) ......
Read more >Why can't I make this axios DELETE request? [duplicate]
Look into CORS for details, but it basilcy means the request source (i.e. localhost) isn't allowed to make a request to the request...
Read more >React Axios Send Asynchronous HTTP Delete Request Tutorial
HTTP Delete request an ideally used to remove or delete a resource or data object from the server. To create a consensus with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is not work
add data property as null then it works
Yeah an example in the docs would be nice. Using all @nickuraltsev example, but json-server deletes all records.