Loading ...
Sorry, an error occurred while loading the content.

18574Re: [rest-discuss] Where should I POST to?

Expand Messages
  • Jon Hanna
    Mar 2, 2012
    • 0 Attachment
      On 2012-03-01 07:45, Ruben Verborgh wrote:
      > - People will never GET /posts/43/comments, because the comments will be served along with every representation of the /posts/43 resource

      One could choose to have a GET to /posts/43/comments 301 to
      /posts/43#comments. Or to just add a GET that returns an entity of just
      the comments, or simply say "well, if I made GET do anything it would be
      to return an entity that shows just the comments, but since it'll never
      be used I'm not going to bother implementing it".

      The main reason I'd argue in favour of posting to /posts/43 is that the
      relationship between /posts/43 and /posts/43 is obvious, while the
      relationship between it and what is (relative to it) ./43/comments is
      less so. Had the post had the URI /posts/43/ with a trailing slash, then
      this would be less so pressing.

      All of this is about niceties though. /adfs/d32rsdf/1ras89%20sfdakl
      would be just as good as either from a purely REST perspective, but
      niceties do matter.
    • Show all 8 messages in this topic