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

$axios.$delete body payload is missing #419

Closed
Bigdragon13th opened this issue Sep 18, 2020 · 12 comments
Closed

$axios.$delete body payload is missing #419

Bigdragon13th opened this issue Sep 18, 2020 · 12 comments

Comments

@Bigdragon13th
Copy link

Bigdragon13th commented Sep 18, 2020

@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

@Bigdragon13th Bigdragon13th changed the title $axios.$delete body is missing on Production mode $axios.$delete body payload is missing Sep 22, 2020
@snsxn
Copy link

snsxn commented Sep 24, 2020

+1

@drocha87
Copy link

I'm experiencing the same problem, looks like the Content-Type: 'application/json' is removed from headers when sending the request. I tried to intercept the request and set the Content-Type header, but without success.

@Bigdragon13th
Copy link
Author

Looks like it's the issue from Axios@0.20.0

axios/axios#3220

@ngajhede
Copy link

There is a PR (axios/axios#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'});

@avrtau
Copy link

avrtau commented Oct 7, 2020

There is a PR (axios/axios#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'});

this.$axios.$request also works.

@jasonsaayman
Copy link

Hi,

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

Thanks

@suruaku
Copy link

suruaku commented Oct 28, 2020

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

The issue is solved in 0.21.0

I made merge request with pkg update #436

@Bigdragon13th
Copy link
Author

@jasonsaayman I've tested Axios 0.21.0 and it fixed the issue, thank you.
But install @nuxtjs/axios 5.12.2 without Axios still give me Axios 0.20.0, so maybe we need to wait for @suruaku 's PR before closing this issue.

@suruaku
Copy link

suruaku commented Nov 4, 2020

But install @nuxtjs/axios 5.12.2 without Axios still give me Axios 0.20.0, so maybe we need to wait for @suruaku 's PR before closing this issue.

It is because how semver works.
See this post or straight from documentation

@Bigdragon13th
Copy link
Author

@suruaku Yeah, I get that

@danielalvarenga
Copy link

But install @nuxtjs/axios 5.12.2 without Axios still give me Axios 0.20.0, so maybe we need to wait for @suruaku 's PR before closing this issue.

It is because how semver works.
See this post or straight from documentation

Wainting for that! 🙌

@pi0
Copy link
Member

pi0 commented Nov 30, 2020

Merged by #410 and updated with v5.12.3. Sorry for delay.

@pi0 pi0 closed this as completed Nov 30, 2020
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

Successfully merging a pull request may close this issue.

9 participants