Should a given URI in a RESTful architecture always return the same response?

Posted by keithjgrant on Stack Overflow See other posts from Stack Overflow or by keithjgrant
Published on 2010-04-20T16:18:51Z Indexed on 2010/04/20 16:33 UTC
Read the original article Hit count: 317

Filed under:
|

This is kind of a follow-up question to this one.

So is having a unique response for any given URI a core tenant of RESTful architecture? A lot of discussion here tends that direction, but I haven't seen it anywhere as a "hard and fast" rule.

I understand the value of it (for caching, crawling, passing links, etc), but I also see things like the twitter API violate it (A request to http://api.twitter.com/1/statuses/friends_timeline.xml will vary based on the username given), and I understand there are times when it may be necessary--not to mention that a chronologically paged resource will also change as new elements are added.

Should I strive for varied responses from the same URI to be eliminated altogether, or do I just accept that sometimes it isn't practical, and as long as I minimize its occurrence, I'll be in decent shape.

© Stack Overflow or respective owner

Related posts about rest

Related posts about uri