REST default routes for create.

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.

Hey Steve,

Thanks for clearing that up. Need to spend more time referring to RFC docs. Glad you pointed me in that direction.

  • Harshal

Thanks for clearing that up. Need to spend more time referring to RFC docs.
Glad you pointed me in that direction.

Any time. :slight_smile: