Earthly Powers
- All
- Fast Infoset
- General
- Java
- REST
Conneg with a redirection twist
An article on Cool URIs for the Semantic Web shows the use of content negotiation with a redirection twist.
A client operating on the 'platonic' URI gets redirected to the distinct URI:
HTTP/1.1 302 Found
Location: http://www.acme.com/people/alice.en.html
Although i think a 303 or 307 should be used to avoid ambiguity when PUT, POST and DELETE are used (the differences between the two are most excellently described in RESTful Web services).
As recommended by RESTful Web services when operating on a distinct URI the 'platontic' URI can be referred to using the Content-Location header.
This connects the 'platonic' and distinct URIs both ways which is, at least, intellectually satisfying. However, i doubt it would solve the content negotiation issues that Joe (that Sam linked to in a blog comment) and Norm ran in to but it may help to resolve the problem.
I am sort of flip-flopping about all this. Content negotiation is very powerful when used correctly, but can cause problems that are tricky to resolve with 'broken' clients/services. URIs can be consumed by other services in ways you don't expect. In any case i see the motivation and value in 'distinct' URIs more so than i did before.
Posted at 11:58AM May 31, 2007 by Paul Sandoz in REST | Comments[2]
Posted by Asbjørn Ulsberg on May 31, 2007 at 02:40 PM CEST #
Posted by Paul Sandoz on June 01, 2007 at 10:04 AM CEST #