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.

DELETE not sending config.data in v0.20.0

See original GitHub issue

Describe the bug

When using axios.delete and sending config.data, the server receives no body

To Reproduce

Make a call using axios delete and send data via the config object. This used to work in v0.19.2 but doesn’t work in v0.20.0 anymore.

axios.delete(BASE_URL + '/user', {
    headers: {
        Authorization: this.authToken
    },
    data: {'userId':'abcd1234'}
})

Expected behavior

Server should receive data-> body

Environment

  • Axios Version [0.20.0]
  • Node.js Version [12.18.3]

Additional context/Screenshots

using v0.19.2 server gets: ‘body’: ‘{“userId”:“abcd1234”}’

using v0.20.0 server gets: ‘body’: None

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
denis-gorincommented, Sep 3, 2020

quick workaround

axios({
    method: 'delete', 
    url :BASE_URL + '/user', 
    headers: {Authorization: this.authToken},
    data: {'userId':'abcd1234'}
})
0reactions
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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release v0.20.0 - PipeCD
Fix a bug that not allowed users can approve the WAIT_APPROVAL stage (#2602) · Add Mention to field to the Slack notification (#2578)...
Read more >
nvm is not compatible with the npm config "prefix" option
Check that nvm is working by executing nvm --version command. After that, install/reinstall NodeJS using nvm install node && nvm alias default node...
Read more >
Deprovisioning - Karpenter
When you run kubectl delete node on a node without a finalizer, the node is deleted without triggering the finalization logic. The instance...
Read more >
Deleting AWS Config Data
Delete AWS Config data by speciying a retention period of Configuration Items.
Read more >
Deep Security 20 Administration Guide
Import computers from a VMware vCloud Air data center. 592. Configure software updates for cloud accounts. 592. Remove a cloud account.
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