Desired functionality
- It is possible to ask for content negotiation to occur
- It is possible to upload multiple representations of a single URI.
Asking for content negotiation
- GET /foo --- will always return "A", no matter what headers are added.
- GET /conneg/foo --- will perform content negotiaion based on the Accept header.
- The Vary header will contain the Accept header
- The response entity will be a specific representation as previously primed (see below)
The conneg element can take a few parameters, indicating the different types of content negotiation
- type -- Accept header (default)
- encoding -- Accept-Encoding
- lang -- Language will be part of the connegging, and Vary will include the language header
- ua -- User Agent
Uploading multiple representations
- echo 'A' | PUT /foo # uploads "default" representation like before
- echo 'B' | PUT -H "Content-Type: text/plain" /foo/representation/1
- echo 'C' | PUT -H "Content-Type: application/json" /foo/representation/2
I need to figure out some way to indicate that a particular representation should be used for a specific combination of request headers