Question

I'm still pretty new to Backbone and I've been trying to find an answer to this for a bit:

So, I know for the first 3 types of CRUD requests (Create, Read and Update) that you have the server return the JSON for a model. What I wanted to know is do you do the same for Delete?

Was it helpful?

Solution

You DO need to respond with JSON. A common practice is just to return a simple JSON object with a message. (It doesn't need to be the data for the model destroyed). Consider responding with:

{ message: "Model successfully destroyed!" }

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top