Hi!
On Sat, Mar 16, 2013 at 12:19 PM, eddelplus <
joc...@eddelbuettel.net> wrote:
> There is a distinction between methods that transfer data and those that do
> not. Interestingly DELETE does not transfer data (i.e. the JSON encoded
> object).
Yes, this is correct. The reason is that behavior of HTTP DELETE
method with body is not defined very precisely and different
server-side endpoints treat the sent body differently (some of the
simply ignoring it).
> Thus calling $delete or $remove as instance methods does not make
> too much sense. I would recommend calling remove() as a (static) method on
> the Class (Report),
I don't think I can agree with this statement. Calling $remove (or
$delete) on instance method makes sense and is simply saying "remove
me".
The trick here is that data in the instance can influence URL sent to
the server (I'm taking about @ params here).
Cheers,
Pawel
--
Looking for bootstrap-based widget library for AngularJS?
http://angular-ui.github.com/bootstrap/