I’m new in CRUD, especially in React JS. So, I’m using Axios in my current project. But when it comes to delete
method on specific item (contact), it said error 400.
// delete contact
const deleteContact = async (id) => {
console.log(id);
const response = await axios.delete(`https://contact.herokuapp.com/contact/${id}`);
return response.data;
};
Did I missing something in my delete
method? I’ve tried to adding data
after url
, but seems doesn’t work and I don’t know which one data should I passed to. Thank you.
New contributor
baqped is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.