list
const postIds = [1, 2, 3]
How to pass the list of postIds posts to the server for deletion using axios?
Tried:
const response = await axios.delete(/api/posts/, { data: { postIds }, });
But if we specify a route without the id ‘/api/posts/’, there will be a 404 error when we send the delete method request.
It is the list that needs to be passed, so that the backend can work with this list.