isomorphic-fetch

WebJar for isomorphic-fetch

License

License

MIT
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

isomorphic-fetch
Last Version

Last Version

2.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

isomorphic-fetch
WebJar for isomorphic-fetch
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/matthew-andrews/isomorphic-fetch

Download isomorphic-fetch

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/isomorphic-fetch/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>isomorphic-fetch</artifactId>
    <version>2.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/isomorphic-fetch/
implementation 'org.webjars.bower:isomorphic-fetch:2.2.1'
// https://jarcasting.com/artifacts/org.webjars.bower/isomorphic-fetch/
implementation ("org.webjars.bower:isomorphic-fetch:2.2.1")
'org.webjars.bower:isomorphic-fetch:jar:2.2.1'
<dependency org="org.webjars.bower" name="isomorphic-fetch" rev="2.2.1">
  <artifact name="isomorphic-fetch" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='isomorphic-fetch', version='2.2.1')
)
libraryDependencies += "org.webjars.bower" % "isomorphic-fetch" % "2.2.1"
[org.webjars.bower/isomorphic-fetch "2.2.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : github-com-github-fetch jar [0.10.0,)

Project Modules

There are no modules declared in this project.

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

Versions

Version
2.2.1