news.volyx.in

Fetch API has landed into Node.js (github.com)

679 points by yamafaktory · 1689 days ago · 206 comments on HN

Article summary

The Fetch API has been added to Node.js as an experimental feature. This addition is expected to improve the development experience for Node.js users. The implementation is based on the Undici library, which provides a fast and spec-compliant HTTP client. The feature is still experimental and may take around a year or two to become stable.

Main themes

  • Fetch API in Node.js
  • JavaScript ecosystem development
  • ES modules and interoperability
  • HTTP clients and APIs
  • Spec development and standardization
  • Server-specific use cases and extensions

What commenters say

  • The Fetch API's addition to Node.js is a significant improvement, but it may take time to become stable and widely adopted.
  • The gap between Node.js and browser implementations of JavaScript is decreasing, thanks to the adoption of ES modules.
  • Some users feel that Node.js is progressing slowly compared to other languages and tools, while others argue that the pace of development is reasonable given the complexity of the ecosystem.
  • There is a desire for a more flexible and customizable Fetch API, with some users suggesting that the spec should be improved or extended to accommodate server-specific use cases.
  • Browsers may not have an incentive to change the Fetch API spec to accommodate Node.js-specific use cases, but some argue that server-specific extensions could be codified in the spec without requiring browser implementation.
  • The Fetch API's current implementation may not be suitable for all use cases, such as talking to SOAP services or handling binary data, and some users argue that a more opinionated API would not be an improvement.