RE: Atom and prev links

"Markus Lanthaler" <[email protected]> Fri, 28 Jun 2013 12:47:35 +0200
Newsgroups gmane.comp.web.services.rest
Message-ID <[email protected]>
On Friday, June 28, 2013 12:16 PM, Greg Young wrote:
> The issue revolves around prev links. At some point on an atom feed
> you will hit the current item, prev will point to the next item that
> does not yet exist. Most implementations I can find 404 this uri and
> the client has the logic to keep polling the 404. This seems off to
> me, I would expect this to be a 204. Then if I change my uri structure
> it becomes a 404, otherwise it would seem that if I change my uri
> structure all prev uris would need to redirect to the new ones (which
> would be a rather large undertaking).

Why don't you just hide the next/prev link till the next/prev resource
really exists? If really necessary, the client can keep polling the last
resource it encountered till the next/prev link becomes available. This also
means that you can decide how to construct the URL of the new element as
soon as it is created instead of relying on, e.g., an autoincrement.

Did I miss something?


--
Markus Lanthaler
@markuslanthaler