Need help with fetch-ponyfill?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

qubyte
207 Stars 35 Forks MIT License 524 Commits 1 Opened issues

Description

WHATWG fetch ponyfill

Services available

!
?

Need anything else?

Contributors list

Fetch Ponyfill

WHATWG

fetch
ponyfill

This module wraps the github/fetch polyfill in a CommonJS module for browserification, and avoids appending anything to the window, instead returning a setup function when

fetch-ponyfill
is required. Inspired by object-assign.

When used in Node, delegates to

node-fetch
instead.

Usage

Browserify

const {fetch, Request, Response, Headers} = require('fetch-ponyfill')(options);

Webpack

import fetchPonyfill from 'fetch-ponyfill';
const {fetch, Request, Response, Headers} = fetchPonyfill(options);

Options

Where

options
is an object with the following optional properties:

| option | description | | ------ | ----------- | |

Promise
| An A+ Promise implementation. Defaults to
window.Promise
in the browser, and
global.Promise
in Node. | |
XMLHttpRequest
| The XMLHttpRequest constructor. This is useful to feed in when working with Firefox OS. Defaults to
window.XMLHttpRequest
. Has no effect in Node. |

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.