10 ms·
Node.js is finally going to get the fetch API
- chrisma0 5y agoGood news! However, according to Robert Nagy's comment they seem to struggle with test coverage for the feature: "There is little interest in writing those [tests for fetch]. To the point where it kind of is blocking further work towards spec compliance". Interesting that this is the main holdup right now.
- mewpmewp2 5y agoThis is a bit off-topic, but am I the only one who thinks "fetch" API is weird? To me the first thing that irks me is the name itself. "Fetch". Simply because api calls that you are making don't have to be about fetching something. You can make a request to create, update or delete something. Why this type of naming? Even for retrieving information the name just seems a bit random.
- move-on-by 5y agoI was under the impression that the term Fetch was chosen because it didn’t have much overlap with existing popular libraries or a common variable name. I feel like I read that in the early days of its creation. However, I just spent a while looking for that discussion in the Whatwg spec and was unable to find it. Would love it if someone else could verify that belief. Perhaps I’m mixing it up with something else.
- zenosmosis 5y agoI somewhat agree with this sentiment (thought about it before as well), though I now tend to think of it as something like "fetching" the result of a given call, regardless of the operation type.
- ttfkam 5y agoFor someone in the know, what's the advantage of adding this to core rather than using the existing node-fetch package I've been using for years? I mean, the API's basically the same, right?
- eyelidlessness 5y agoNode, especially since Deno has been gaining interest, has been gradually moving towards web API compatibility. It’s good for portability if nothing else. What’s a bit surprising is that they’re not re-implementing it in core, they’re embedding the undici library’s implementation.