Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.96 KB

README.md

File metadata and controls

60 lines (48 loc) · 2.96 KB

@web-std/node-fetch

ci package downloads

Web API compatible fetch API for nodejs.

Comparison to Alternatives

The reason this fork exists is because node-fetch chooses to compromise Web API compatibility and by useing nodejs native Readable stream. They way they put it is:

  • Make conscious trade-off when following WHATWG fetch spec and stream spec implementation details, document known differences.
  • Use native Node streams for body, on both request and response.

We found these incompatibility to be really problematic when sharing code across nodejs and browser rutimes. Insteadead of introducing such an incompatibility this library exposes nodejs streams through nodeStream property. This library introduces web compatibility by lazily wrapping underlying node streams via web-streams-polyfill on property access.

License

MIT