JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 639920
  • Score
    100M100P100Q190417F
  • License MIT

Web API compatible fetch implementation

Package Exports

  • @remix-run/web-fetch
  • @remix-run/web-fetch/body
  • @remix-run/web-fetch/package.json
  • @remix-run/web-fetch/src/headers.js
  • @remix-run/web-fetch/src/request.js
  • @remix-run/web-fetch/src/response.js

Readme

@remix-run/web-fetch

ci package downloads

Web API compatible fetch API for nodejs.

Comparison to Alternatives

node-fetch

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

  • Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] 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. This library uses @remix-run/web-stream instead.