Reputation: 342
i'd like to fetch a bunch of models via a collection by a list of model IDs. My problem is that i have to fetch dozens of models at once. I don't want to put dozens over douzens of IDs into the URL when firing a GET request.
I'm thinking about a POST request. But can this be done via Collection?
Maybe this way: https://gist.github.com/2953670
I know i'm raping a POST/create request. Alternatively i have jQuery.post() in mind.
What is the better way?
Thanks in advance, JW
Upvotes: 0
Views: 1818
Reputation: 1198
Everytime a model/collection does a sync call, it actually does return (this.sync || Backbone.sync).call...
. This allows you to implement a custom sync for a specific model or collection.
var Equipment.Collection = Backbone.Collection.extend({
...
"sync": urSync,
...
});
Upvotes: 1