backbone-poller icon indicating copy to clipboard operation
backbone-poller copied to clipboard

Add option for save

Open scott-w opened this issue 8 years ago • 3 comments

I'm just working on a feature that provides auto-save capabilities and it'd be really nice to use backbone-poller to achieve this.

My thinking is the API could be:

this.poller = Poller.get(this.model, {method: 'save'});

With method defaulting to fetch.

scott-w avatar Aug 30 '17 13:08 scott-w

Sure. It's not s poller per-se at that point, but i can't see reason why not

ukilon-okta avatar Aug 30 '17 13:08 ukilon-okta

I do agree, it was something that went through my head as I wrote Poller.get - it doesn't suggest that POST/PUT operations will occur

scott-w avatar Aug 30 '17 13:08 scott-w

Poller.get is more of a singleton getInstance rather than HTTP GET, but in general, polling should have no side affect. in anywise, leave semantics aside, if you could add this to the code that'd be great

uzikilon avatar Aug 30 '17 13:08 uzikilon