문제

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