Re:Modern Node.js Patterns
by catlifeonmars on Sunday August 03, 2025 @07:41PM
(#44780792)
“Most” is doing a lot of heavy lifting here. I use plenty of APIs that are GET
I was thinking server-side where it's probably 90%+ POST. True, client-side a lot different (node the only player client-side, though).
That's a category error. Fetch is just refers to making a request. POST is the method or the HTTP verb used when making the request. If you're really keen, you could roll your own
const post = (url) => fetch(url, {method:"POST"})
Re:Modern Node.js Patterns
by catlifeonmars on Sunday August 03, 2025 @07:44PM
(#44780808)
I read this as OP commenting on the double meaning of the category. In English, “fetch” is a synonym of “GET”, so it’s silly that “fetch” as a category is independent of the HTTP method
That makes sense.
Node was created with first-class native http server and client support. Wrapper libraries can smooth out some rough edges with the underlying api as well as make server-side js (Node) look/work similar to client-side js (Browser).
Also, "fetch" is lousy naming considering most API calls are POST.