Axios does not use data from config when making DELETE request
See original GitHub issueDescribe the bug
Axios last version (0.20.0) does not use data from config when making DELETE request. In 0.19.2 it’s working fine
To Reproduce
axios.delete("...", {
data: { ids: [...] },
}).then(response => {
...
}).catch(error => {
...
});
Expected behavior
Axios send request data from config when making DELETE request
Environment
- Axios Version 0.20.0
- Browser Chrome
- Browser Version 84.0.4147.125
- Node.js Version 12.18.3
- OS: Linux Mint
- Additional Library Versions React 16.13.1
Additional context/Screenshots
None
Issue Analytics
- State:
- Created 3 years ago
- Reactions:71
- Comments:19 (1 by maintainers)
Top Results From Across the Web
Axios delete request is not taking the body data - Stack Overflow
Axios expects only one config object in delete request. (See here: https://github.com/axios/axios#axiosdeleteurl-config) The config is expected ...
Read more >Axios Cheat Sheet - Kapeli - Dash for macOS
Make a request for a user with a given ID axios.get('/user?ID=12345') .then(function (response) { console.log(response); }) .catch(function (error) ...
Read more >axios - npm
Request Config. These are the available config options for making requests. Only the url is required. Requests will default to GET if method...
Read more >Axios API | Axios Docs
Requests can be made by passing the relevant config to axios . ... When using the alias methods url , method , and...
Read more >ReactJS Axios GET, POST, PUT and DELETE Example Tutorial
As we know, React is a JavaScript-based library that does not have the ability to make HTTP requests; thus, we need to use...
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 Free
Top 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
I’m getting this same issue. It took a long time to figure out it was an issue with the package, this is probably a relatively urgent fix.
FYI the following is a work around until this is fixed