Data option not being set in axios.delete in v0.20
See original GitHub issueDescribe the bug
The data option in axios.delete(url, {options}) api is always staying undefined, even after passing the data option with proper values.
To Reproduce
// Example code here
const res = await axios.delete('/api/example', {data:{ id: id}});
Expected behavior
A clear and concise description of what you expected to happen.
Environment
- Axios Version [0.20.0]
- Adapter [HTTP]
- Browser [Chrome]
- Browser Version [85.0.4183.83 (Official Build) (64-bit)]
- Node.js Version [e.g. 10.19.0]
- OS: [Linux 4.15.0-112-generic x86_64]
- Additional Library Versions [React 16.13.1]
Additional context/Screenshots
But this is what I am getting:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Axios delete request is not taking the body data - Stack Overflow
delete requests with a body need it to be set under a data key export const deleterequest = (url, jdId) => axios.delete( url,...
Read more >Understanding Axios GET requests - LogRocket Blog
Learn how to make GET requests in Axios with query parameters and API keys, plus concurrent and HEAD requests and error handling.
Read more >axios clear cookies | The AI Search Engine You Control
solutions that'd help with my problem: 1.) able to choose when NOT to pass a cookie with request (not sure if the new...
Read more >node_modules/axios • Directory Lister Demo
axios.delete(url[, config]). axios.head(url[, config]). axios.options(url[, config]). axios.post(url[, data[, config]]). axios.put(url[, data[, config]]).
Read more >React axios proxy not working - Caritas Castellaneta
Aug 12, 2021 · Axios not using proxy setting with https - react . Sep 20, 2018 · Let's start with an obvious...
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
Hi,
Axios version 0.21.0 has been released 🎉 please use that and let us know if that solves your issue.
Thanks
Also had this problem - 0.21.0 fixed for me too. Thanks all!