Chris's Wiki :: blog/web/PracticalRESTAccept Commentshttps://utcc.utoronto.ca/~cks/space/blog/web/PracticalRESTAccept?atomcommentsDWiki2011-12-15T09:56:05ZRecent comments in Chris's Wiki :: blog/web/PracticalRESTAccept.From 78.35.25.18 on /blog/web/PracticalRESTAccepttag:CSpace:blog/web/PracticalRESTAccept:722c411788bb951e77dddaa8ab94b6d8f7b66a19From 78.35.25.18<div class="wikitext"><p>Your criticism of naïve implementation of <code>Accept</code> is on the mark, but framing this in terms of purity vs pragmatism is a false dichotomy. There is nothing in REST which forbids you from representing the same information with more than one URI. So there is no reason not to have a single URI that redirects based on <code>Accept</code>, e.g. a <code>feed</code> which redirects to either <code>feed.rss</code> or <code>feed.atom</code>, depending on what media type you requested. And there is nothing in HTTP to make this illegal either.</p>
<p>(It might be sensible to include a <code>Content-Location</code> header pointing back to <code>feed</code> with those responses. But I am not sure of it and would need to examine the text in RFC 2616 more carefully than I can be bothered right now.)</p>
<p>—<a href="http://plasmasturm.org/">Aristotle Pagaltzis</a></p>
</div>2011-12-15T09:56:05Z