can pass data in DELETE method in axios code example
Example 1: axios delete request payload
//instead of
axios.put(url, { foo: "bar" });
//wrap the data in the data propery of a new object
axios.delete(url, { data: { foo: "bar" } });
Example 2: how to send axios delete to the backend reactjs
axios.delete(URL, {
headers: {
Authorization: authorizationToken
},
data: {
source: source
}
});