Redirect Without Changing URI
Shea Levy <[email protected]> Tue, 21 May 2013 12:40:58 -0400
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I recently ran into a situation where I had several pages that had the same content, but represented different states in the application due to where links from the page pointed. As an example, consider a game where you move from room to room, each room may have monsters to fight or items to pick up and may have any number of exits. You might have two rooms with the same contents and the same exits, but exiting north from the first room brings you to a different place than exiting north from the second. My first thought on representing this would be to have each exit be a hyperlink with a relative URI, and respond to the request to get one of the identical rooms with a protocol-level redirect (to the same shared resource) that doesn't cause the client to change the meaning of relative URIs. Do any REST-capable protocols (the only one I know of is HTTP?) support this? Could they? Thanks, Shea