3.0.0 • Published 4 years ago

isomorphic-fetch v3.0.0

Weekly downloads
4,828,473
License
MIT
Repository
github
Last release
4 years ago

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

@jimp/core@sherlo/api-sdk-client@procore/labs-coordination-issue-panel@procore/labs-observation-panel@procore/labs-rfi-panel@solve3/modal@dyng/kdjs@vizzly/common@vizzly/dashboard@gooddata/api-client-beardecentralanddota2_web_api@o3r/dev-tools@artsy/reaction@knapsack/app@paxport/model-paxshoprb-email-clientteach_and_learn@cent-finance/sorpadlocksster-toolkitreact-native-bluetooth2killi8n-react-native-fast-imagenightwatchjs.orgps_ccms_loginmini-next-ssrxdf-nt@mobgen-halo/halo-sdk-js@graphqlzero/webwind-map-sdk@udacity/ureact-experimentstarnet-jumbo-reacttemplate-handlebarssmt-form-builderappirio-tech-client-app-layer-testblebber-clientblebbercognitio-authpri_cnip_module_inecwclientlibjsadamgering-stably-sdkstably-sdkzozengo-reactrn-send-smsusimple-jsapp-campusteststepteststep-core@geodashboard/gd-core__old@geodashboard/gd-gltg__old@sadorlovsky/currency-converter@authdog/lock-coresprintpay_paymentmethodsfrontendcpa3fondfolio@amra-finance/ding@zzappie/bigchaindb-driveradamstably-stably-sdkitem-validatoralexeistukov-http@danielhuisman/takeawaygissy-dashboardlayout-comps@cognitive3d/cognitive3d-analytics@moonwalker/lifesupportreact-fondlegraphql-playground-react-authwebkit-watson-html5-speech-recognitionbose-compsruntime-reasonwind-map-basic-service@arisageha/react-lazyload@arisageha/react-lazyload-fixcustomer-analytics-packageplayer-react@udacity/auth-servicesdops-client-sharedspcp-oidcbinance-api-node-fullrangewell-dataproviderscm-uifetch-maker@synapsestudios/securecomsiajs@frankast/sms-sendertruckersmp.ts@lemmsoft/docker-windows-detect-changes@teslagov/rampart-api-request@cloudflare/util-sparrowcouchrelayvouched-nodejs@homeexchange/react-roulettedgraph-js-http-2ecp-frontendgraphql-typed-client-minimalassessment-renderer-saasreact-native-template-rfbasekelex-clikelex-plugin-testbento-frontend
3.0.0

4 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.7.0

9 years ago

1.6.1

9 years ago

1.6.0

9 years ago

1.5.2

9 years ago

1.5.1

9 years ago

1.5.0

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.0

9 years ago