MCPcopy Create free account
hub / github.com/matthew-andrews/isomorphic-fetch

github.com/matthew-andrews/isomorphic-fetch

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.1 ↗ · + Follow · compare 2 versions
1 symbols 1 edges 4 files 0 documented · 0% updated 2y agov2.1.1 · 2015-07-16★ 6,90746 open issues

Browse by type

Functions 1 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

isomorphic-fetch Build Status

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.
  • You must bring your own ES6 Promise compatible polyfill, I suggest es6-promise.

Installation

NPM

npm install --save isomorphic-fetch es6-promise

Bower

bower install --save isomorphic-fetch es6-promise

Usage

require('es6-promise').polyfill();
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.

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

test/api.test.js1 symbols

Dependencies from manifests, versioned

chai1.10.0 · 1×
es6-promise2.0.1 · 1×
jshint2.5.11 · 1×
lintspaces-cli0.0.4 · 1×
mocha2.1.0 · 1×
nock0.56.0 · 1×
node-fetch1.0.1 · 1×
npm-prepublish1.0.2 · 1×
whatwg-fetch0.8.2 · 1×

For agents

$ claude mcp add isomorphic-fetch \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page