質問

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?

役に立ちましたか?

解決

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!" }

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top