I have been trying to look for more information about the restful api, I have found many places talk about what request (method and data) to make for retrieve, create, update object in server, but I couldn't find a place that explains what the server side should return. specifically for backbone.js.
I understand for GET method to a "path/:id", the server would probabily return an stringify json object "{id:1,data:aaa}", or an array of json object. but for create, update and delete, I don't know what the server should return so backbone will acknowledge that server has successfully created the object? I found some api does this: create successful returns:
{ "createAt":"2014-1-01 11:59pm"}
or failed returns
{ "error":true}
some api does this:
{"sucess":true} or {"error":true}
What is the result that backbone expect?
Thanks