RE: Changing representations

> If I've understood correctly, you have described two competing service
> models for a given URI: (a) one PUT affects all GET media types; versus
> (b) one PUT per GET media type.  Both seem perfectly valid and seem to
> me to fill different use cases.  

Think of the possibility where the server can convert on the fly between multiple representations, based on the "Accept" header. 
In this case, there are multiple representations (anything that can be converted to) but only one resource (which serves the 'original' if its format is acceptable, otherwise something converted).

That use case was forefront in my mind when we were adding content-negotiation to HTTP.

The GET media types are all just shadows of the original. "PUT" says "replace this resource with some resource based on the included representation".

I don't think (b) is "perfectly valid" in this use case.  But (a) is. I can't think of any use case where the converse is true.

Received on Friday, 27 July 2012 19:04:33 UTC