Hey Steve, Thanks for clearing that up. Need to spend more time referring to RFC docs. Glad you pointed me in that direction.
- Harshal On Thu, Aug 9, 2012 at 10:14 AM, Steve Klabnik <[email protected]>wrote: > From a REST perspective, the URL is 100% irrelevant. > > I havent tested it with analytics or anything, I'm pretty sure that > the number of people who go "oh, my form failed. I'd better see what > the URL is. Oh, /things!' How odd? I expect that to be a list?? What's > going on???' is zero. > > /things works because it's both the list of things and where you send > data to make a new thing in the list. From RFC2616: > http://tools.ietf.org/html/rfc2616.html#section-9.5 > > > The POST method is used to request that the origin server accept the > > entity enclosed in the request *as a new subordinate of the resource* > > identified by the Request-URI in the Request-Line. > > Emphasis mine. It is arguable that /things/1 is not subordinate to > /things/new, and therefore, it's better to POST to /things. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
