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.

$axios.$delete body payload is missing

See original GitHub issue

@nuxtjs/axios version: 5.12.2

Issue: When trying to call API on delete method, the request body is missing.

Example problematic code:

$axios.$delete('/store/products', {
    data: {
        [
            {
                sku: '1234',
            },
        ],
    },
}

More information: @nuxtjs/axios 5.12.1 don’t have this problem

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
ngajhedecommented, Sep 30, 2020

There is a PR (https://github.com/axios/axios/pull/3282) ready. Question is when 0.20.1 will be released.

A solution we found for now is using axios.request({url, data, method: 'delete'});

3reactions
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

Axios - DELETE Request With Request Body and Headers?
Show activity on this post. For Axios DELETE Request, you need to include request payload and headers like this under one JSON object:...
Read more >
HTTP DELETE Requests with Body in Axios - Mastering JS
To send a request body with an Axios DELETE request, you should set the data option.
Read more >
Axios Delete request with body and headers? - SyntaxFix
I've been searching in the inter webs and only found that the DELETE method requires a "param" and accepts no "data". axios. delete(URL,...
Read more >
Axios - HTTP DELETE Request Examples - Jason Watmore's
Below is a quick set of examples to show how to send HTTP DELETE requests to an API using the axios HTTP client...
Read more >
axios delete request body Code Example - Code Grepper
“axios delete request body” Code Answer's · axios delete request payload · axios delete request · axios delete request · Browse Javascript Answers...
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