News for hackers. Stuff that matters.
Re:Ask HN: Suggestions for books about API design? by pvg on Saturday September 05, 2020 @11:42AM (#24384361)
I don't think there's ever been a time browsers haven't reliably supported POST.
Re:Ask HN: Suggestions for books about API design? by pixelmonkey on Saturday September 05, 2020 @12:46PM (#24384922)
In a cross-domain context, when you are expecting the browser to make its XHR for JSON data via JavaScript to a third-party API. Think about making a call to the Flickr.com HTTP API from your own WordPress myblog.com domain. In that context, the XHRs didn't support POST/PUT. Remember, even the fetch() API is pretty recent. POST-based forms are irrelevant for API usage.

This MDN doc covers some of the complexity:

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

And here is when browsers added support for CORS:

https://caniuse.com/#feat=cors

Re:Ask HN: Suggestions for books about API design? by 082349872349872 on Saturday September 05, 2020 @12:36PM (#24384848)
I dimly recall a pre-form web, but it could easily be they just took over a little-used Berners-Lee verb. (For instance, PUT support was atrocious for a while.)
Re:Ask HN: Suggestions for books about API design? by pixelmonkey on Saturday September 05, 2020 @12:55PM (#24384988)
This is not about pre-form web. It's about pre-CORS web. Which is pretty recent web. CORS was "widely & properly" supported by "recently released" browsers around 2012-2013. Of course it's only as of very recently that you could safely assume 2010-2013 browser versions were completely out of circulation.
Re:Ask HN: Suggestions for books about API design? by 082349872349872 on Saturday September 05, 2020 @01:05PM (#24385082)
My bad; hadn't parent'ed enough, and the "using different methods than GET" clarification would not have been anachronistic even in the previous century.
Re:Ask HN: Suggestions for books about API design? by karlshea on Saturday September 05, 2020 @01:49PM (#24385445)
PUT can still be weird. For example, PHP doesn't process multipart/form-data if it's a PUT instead of a POST, I'm working on an API in Laravel and for methods that need to PUT a file I have to use Laravel's _method spoofing.