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
Support delete body #897
Comments
We often use |
Thanks, Here I found this answer |
axios.delete(url, { data: { foo: "bar" } });
axios.put(url, { foo: "bar" }); Hope it helps! |
I think the
This part: |
please add this comment to the docs |
It's on the docs https://github.com/axios/axios#request-method-aliases |
what is the difference between these two?
[params] worked on my side |
This is probably a design choice by the axios team and for good reason but I write all my POST/GET/PUTs like this:
And my server sometimes expects data inside the DELETE request body (which may not be technically according to spec but nonetheless it is common) in which case I have to write my DELETE in this form:
Which works fine but I'm forced to use the second syntax because the
axios.delete
doesn't support a request body.So I would like to request that
axios.delete
will support a request body.Thanks
The text was updated successfully, but these errors were encountered: