HTTP DELETE Requests with Body in Axios

Jul 7, 2021

To send a request body with an Axios DELETE request, you should set the data option.

const res = await axios.delete('', { data: { answer: 42 } });; // { answer: 42 }

Remember that the 2nd parameter to axios.delete() is the Axios options, not the request body. You can't pass the request body as the 2nd parameter like you can with or axios.put().

More Axios Tutorials