Re: Link Relations

Erik Wilde <[email protected]> Sun, 10 Nov 2013 08:42:21 -0800
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
hey jan.

> On Nov 10, 2013, at 2:23, Jan Algermissen <[email protected]> wrote:
> Make the state a resource and modify that:
> 
> PUT /playlist/77626/state
> Content-Type: application/vnd.foo.state
> 
> <state>live</state>
> 
> Personally, I aim for avoiding the need to introduce a media type for this ...

why create a separate media type? you're designing the playlist media type anyway, including a fragment that's embedded in the playlist representation to indicate the playlist status. simply allow PUT on a linked sub-resource with the exact same syntax. all you have to do is create a new document/message type in your media type: problem solved.

cheers,

dret.