- From: Asbjørn Ulsberg <asbjorn@ulsberg.no>
- Date: Fri, 1 Nov 2024 23:52:29 +0100
- To: Michael Toomim <toomim@gmail.com>
- Cc: Julian Reschke <julian.reschke@gmx.de>, Josh Cohen <joshco@gmail.com>, ietf-http-wg@w3.org
On 1 Nov 2024, at 23:09, Michael Toomim <toomim@gmail.com> wrote: > However, I don't think that being able to interact with something over HTTP is enough to make it a resource. If my resource /foo has two representations (one in HTML, and one in text/plain), then I can interact with those representations over HTTP, but that doesn't make each representation a separate resource. As representations of the same logical resource can have different URIs, they can also share the same canonical URI. This is usually the case for a resource being available in different languages, for example. As Fielding wrote on rest-discuss in 2006[1]: > The sites that I produce *always* separate languages into separate > URI trees. And: > In general, I avoid content negotiation without redirects like the > plague because of its effect on caching. I think the same applies to versions, formats, etc., of the same resource. The link relation `canonical`[2] can be used to identified a shared, canonical URI. > Likewise, I think a resource can have multiple versions, and those versions do not necessarily need to be their own resources. > This semantic distinction seems to be at the root of our different perspectives on the versions-02 draft. > Thoughts? I don’t think the spec should be dogmatic about it. Give implementers the flexibility to choose. Sometimes it makes sense to serve different representations at the same URI, sometimes it doesn’t. I think it would be unwise to force this either way, although the spec could of course give some guidance as to why different URIs for different representations may be recommended for the caching reasons mentioned by Fielding. [1]: https://web.archive.org/web/20151225224754/https://groups.yahoo.com/neo/groups/rest-discuss/conversations/messages/5857 [2]: https://www.rfc-editor.org/rfc/rfc6596.html -- Asbjørn Ulsberg. -=|=- asbjorn@ulsberg.no «He's a loathsome offensive brute, yet I can't look away»
Received on Friday, 1 November 2024 22:52:48 UTC