News for hackers. Stuff that matters.
Re:Fetch API has landed into Node.js by nailer on Tuesday February 01, 2022 @11:03AM (#30164313)
As mentioned existing HTTP clients had this behaviour back in 2012, the designers of fetch chose to ignore these cowpaths in favour of a more minimal implementation requiring the use of third party HTTP clients in both browsers and node, simply to have reasonable defaults and not repeat oneself, for the foreseeable future.
Re:Fetch API has landed into Node.js by andreigheorghe on Tuesday February 01, 2022 @02:54PM (#30168243)
the value the js community gets from `fetch` being a unified standard is far, far greater than the benefit you as a developer would get from not having to add 15 extra LOC around `fetch`, that you'll probably hide behind a `fetchJSON` function anyway.
Re:Fetch API has landed into Node.js by nailer on Tuesday February 01, 2022 @05:25PM (#30170387)
Point is everyone had a slightly different 150 LOC or a library to achieve essentially the same thing.

We could have stuck with ‘if index is not equal to minus one’ but we have array includes now for the same reason.