goodeggs / angular-cached-resource

An AngularJS module to interact with RESTful resources, even when browser is offline
MIT License
216 stars 29 forks source link

Describe assumptions about backend #7

Open hazeledmands opened 10 years ago

hazeledmands commented 10 years ago

Assumptions we make include:

sdhull commented 9 years ago

Seems that following your example in the README

// POST/PUT/PATCH/DELETE requests:
var a2 = new Article({id: 2});
a2.title = "This article will be saved eventually...";
a2.body = "Even if the browser is offline right now.";
a2.$save();

Will trigger a POST to /articles/2 -- so your backend server must support upsert.

I intend to add something to this effect in my PR #78