Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DELETE not sending config.data in v0.20.0 #3249

Closed
tamsler opened this issue Sep 1, 2020 · 5 comments
Closed

DELETE not sending config.data in v0.20.0 #3249

tamsler opened this issue Sep 1, 2020 · 5 comments

Comments

@tamsler
Copy link

tamsler commented Sep 1, 2020

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

@DRoet
Copy link

DRoet commented Sep 2, 2020

duplicate of #3220

@14glwu
Copy link

14glwu commented Sep 3, 2020

I also meet this problem

@denis-gorin
Copy link

quick workaround

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

@chinesedfan
Copy link
Collaborator

Duplicate of #3220. Sorry for the breaking.

@jasonsaayman
Copy link
Member

Hi,

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

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants