question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data option not being set in axios.delete in v0.20

See original GitHub issue

Describe 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. axios_expected

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: axios_getting

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:13
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
jasonsaaymancommented, Oct 23, 2020

Hi,

Axios version 0.21.0 has been released 🎉 please use that and let us know if that solves your issue.

Thanks

1reaction
pinpointpandacommented, Dec 17, 2020

Also had this problem - 0.21.0 fixed for me too. Thanks all!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found