5 ms·
POST is effectively the catch-all verb. There's nothing that violates HTTP spec in having a site that only has one endpoint, `POST /`, that specifies the actual
by lwf 7y ago
POST is effectively the catch-all verb. There's nothing that violates HTTP spec in having a site that only has one endpoint, `POST /`, that specifies the actual JTBD somewhere in the request body. It's simply nasty and unidomatic.
c.f. https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
User agents still don't support PUT et all in forms without JavaScript -- you're limited to GET/POST, c.f. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fo...
- chrisseaton 7y ago> User agents still don't support PUT et all in forms without JavaScript So why were they in the original HTTP spec if they weren't supported by original HTTP agents?
- detaro 7y agoThey were only added in HTTP 1.1, and it's initial drafts had even more variants that were clearly for file management: https://tools.ietf.org/html/draft-ietf-http-v11-spec-00#section-5.1.1 https://tools.ietf.org/html/draft-ietf-http-v11-spec-00#sect... This is before me being old enough to follow technology, so below is a good portion of conjecture and hearsay (I'd love to be corrected by someone who actually remembers it): Tim Berners-Lee initial web browser was intended as an editing tool as well as a viewer, and these ideas came back when they went to write up HTTP as a a "proper" IETF standard. Not uncommon (bit less so today, but back then especially) to design specs with what they thought it should do, not what they'd tried/done in practice. Making an official spec is the chance to get this stuff in. At some point, a bunch of the file-specific stuff was split off to WebDAV as an extra thing (work on that started 1996, HTTP 1.1 was finished 1997) - or rejected and WebDAV created as a new home for those ideas? But PUT among some others survived.
- thephyber 7y ago> So why were they in the original HTTP spec if they weren't supported by original HTTP agents? Bad assumption.[1] HTTP/1.0 spec (1996) defined GET, POST, and HEAD.[2] HTTP/1.1 spec (1997) defined all of the other, newer methods.[3] > supported by original HTTP agents The first web browsers I know about were Mosaic (1993) and Netscape Navigator (1994) predating the HTTP/1.0 RFC. [1] https://stackoverflow.com/questions/41411152/how-many-http-verbs-are-there https://stackoverflow.com/questions/41411152/how-many-http-v... [2] https://tools.ietf.org/html/rfc1945#section-5.1.1 https://tools.ietf.org/html/rfc1945#section-5.1.1 [3] https://tools.ietf.org/html/rfc2068#section-9 https://tools.ietf.org/html/rfc2068#section-9
- yxhuvud 7y agoWhat I still don't understand is why they didn't add support for them to forms.