MCPcopy
hub / github.com/matthew-andrews/isomorphic-fetch

github.com/matthew-andrews/isomorphic-fetch @v3.0.0 sqlite

repository ↗ · DeepWiki ↗ · release v3.0.0 ↗
1 symbols 1 edges 4 files 0 documented · 0%
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.

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

npm install --save isomorphic-fetch

Bower

bower install --save isomorphic-fetch

Usage

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

Core symbols most depended-on inside this repo

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

test/api.test.js1 symbols

Dependencies from manifests, versioned

chai4.2.0 · 1×
jshint2.5.11 · 1×
lintspaces-cli0.7.1 · 1×
mocha8.1.3 · 1×
nock13.0.4 · 1×
node-fetch2.6.1 · 1×
whatwg-fetch3.4.1 · 1×

For agents

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

⬇ download graph artifact