A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/qubyte/fetch-ponyfill below:

GitHub - qubyte/fetch-ponyfill: WHATWG 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.

const {fetch, Request, Response, Headers} = require('fetch-ponyfill')(options);
import fetchPonyfill from 'fetch-ponyfill';
const {fetch, Request, Response, Headers} = fetchPonyfill(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.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4