svix-fetch

4.0.0 • Public • Published

svix-fetch is a fork of Matthew Andrew's wonderful WHATWG Fetch polyfill for node and bowserfy: isomorphic-fetch.

The main purpose of this fork is to enable keepalives when running in a node context.

Unless you have a specific need for this functionality we recommend using isomorphic-fetch.

Installation

NPM

npm install --save svix-fetch

Bower

bower install --save svix-fetch

Usage

require('svix-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

This code is licenced under the MIT licence. Based on isomorphic-fetch by matthew-andrews.

Alternatives

/svix-fetch/

    Package Sidebar

    Install

    npm i svix-fetch

    Weekly Downloads

    256,707

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    6.42 kB

    Total Files

    11

    Last publish

    Collaborators

    • svixdev