Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

isomorphic-fetch

> 编程语言
Open source

Isomorphic WHATWG Fetch API, for Node & Browserify

6.9K stars0 likes2 views
WebsiteGitHub

About

Isomorphic WHATWG Fetch API, for Node & Browserify

isomorphic-fetch

Fetch for node and Browserify. Built on top of GitHub's WHATWG Fetch polyfill.

Warnings

  • This adds fetch as a global so that its API is consistent between client and server.

For ease-of-maintenance and backward-compatibility reasons, this library will always be a polyfill. As a "safe" alternative, which does not modify the global, consider fetch-ponyfill.

Why Use Isomorphic Fetch

The Fetch API is currently not implemented consistently across browsers. This module will enable you to use fetch in your Node code in a cross-browser compliant fashion. The Fetch API is part of the Web platform API defined by the standards bodies WHATWG and W3C.

Installation

NPM

bash
npm install --save isomorphic-fetch

Bower

bash
bower install --save isomorphic-fetch

Usage

javascript
require('isomorphic-fetch');

fetch('//offline-news-api.herokuapp.com/stories')
	.then(function(response) {
		if (response.status >= 400) {
			throw new Error("Bad response from server");
		}
		return response.json();
	})
	.then(function(stories) {
		console.log(stories);
	});

License

All open source code released by FT Labs is licenced under the MIT licence. Based on the fine work by jxck.

Alternatives

  • cross-fetch
  • Using node-fetch and the Fetch polyfill directly (or from polyfill.io, or relying on the browser's implementation of the Fetch API).

Issues· 57 open

View all issuesOpen on GitHub
  • #211

    Update documentation with a disclaimer that node already supports fetch

    Updated Dec 20, 2025
  • #209

    Isomorphic fetch returns response with empty stream body

    Updated Mar 22, 2024
  • #153

    set-cookie support in isomorphic-fetch in nodeJs application (question)

    Updated Dec 21, 2023
  • #194

    Node.js - realFetch.call is not a function

    Updated Apr 18, 2023
  • #206

    How to access the referer using isomorphic fetch library? An example would help!

    Updated Jun 19, 2022
  • #205

    Interceptors

    Updated Jun 1, 2022
  • #67

    Can not read content-disposition from resposne header

    Updated Feb 14, 2022
  • #200

    update node-fetch to v3.x

    Updated Feb 7, 2022
  • #202

    Found a possible security concern

    Updated Jan 7, 2022
  • #201

    Security risk

    Updated Dec 7, 2021

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 23, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言