I have an AngularJS $resource defined like this:
var Menus = $resource('http://cafe.com/api/menus');
and a RESTful API. So when I do a GET
on Menus
I get this back:
<cafe>
<collection href="http://cafe.com/api/menus" type="menus">
<template>
<data name="Name" prompt="Menu name" />
</template>
<items>
<item href="http://cafe.com/api/menus/1">
<link href="http://cafe.com/api/menus/1/ingredients" rel="ingredients" />
<data name="Name" prompt="Menu name">Morning</data>
</item>
<item href="http://cafe.com/api/menus/2">
<link href="http://cafe.com/api/menus/2/ingredients" rel="ingredients" />
<data name="Name" prompt="Menu name">Happy Hour</data>
</item>
</items>
</collection>
</cafe>
Question is, how do I delete menu 2? (given that it has its own hypermedia link: http://cafe.com/api/menus/2
)