On Wed, Aug 3, 2011 at 10:02 AM, Asseg, Frank
<frank.as...@fiz-karlsruhe.de> wrote:
> On 08/03/11 15:51, Chris Wilper wrote:
>> Hi Frank,
>>
>> The resource denoted by objects/{pid}/datastreams is not an XML file
>> -- it is the more abstract notion of the set of datastreams in the
>> indicated object. In REST, it is fine for a single resource to have
>> multiple representations, one of which is more detailed than the
>> other.
> Is it also ok to have multiple representations of the same mime type
> then?

Yes. Consider the Accept-Language: HTTP request header as an example.

> since content negotation should be deciding with which
> representation to answer the request, it should be set in the
> Accept-Header, and this would be application/xml for both.
>  That's why i always thought along the lines of one representation of
> the resource per mime-type...

If the media-type actually varies between the alternate
representations, then the Accept: header is a reasonable place for
clients to specify that they prefer one particular representation over
another. But as Steve points out, RFC2616 explicitly states that the
server is allowed to use any aspect of the request to decide which
representation to deliver.

- Chris

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Fedora-commons-developers mailing list
Fedora-commons-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to