Google News
logo
Backbone - Interview Questions
What is the Overriding Backbone.sync?
If you are working with Backbone, Backbone models follow traditional REST. As mentioned in the docs for Backbone. Sync () :

* Create → POST /collection
* Read → GET /collection [/id]
* Update → PUT /collection/id
* Patch → PATCH /collection/id
* Delete → DELETE /collection/id

If you need to modify what verbs and endpoints are used for methods fetch (), save (), and destroy (), you can override Backbone.sync on a per model basis to accomodate custom endpoints and HTTP verbs.
Advertisement