{"_id":"fetch-polyfill","_rev":"13-177a9f7741769964edf7ff02f065cc28","name":"fetch-polyfill","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","dist-tags":{"latest":"0.8.2"},"versions":{"0.7.1":{"name":"fetch-polyfill","version":"0.7.1","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/github/fetch.git"},"licenses":[{"type":"MIT","url":"https://github.com/github/fetch/blob/master/LICENSE"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"27aea62113ff8caeec356ac8685a325067575e22","description":"The global `fetch` function is an easier way to make web requests and handle responses than using an XMLHttpRequest. This polyfill is written as closely as possible to the standard Fetch specification at https://fetch.spec.whatwg.org.","bugs":{"url":"https://github.com/github/fetch/issues"},"homepage":"https://github.com/github/fetch#readme","_id":"fetch-polyfill@0.7.1","scripts":{},"_shasum":"d5ce4c348ee2f40842aeaa1135a28a9fb67f6592","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"undozen@creditcloud.com"}],"dist":{"shasum":"d5ce4c348ee2f40842aeaa1135a28a9fb67f6592","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.7.1.tgz","integrity":"sha512-G1K3Gx0I/W8IqRjrg+8eFUzjAfm2yqrBZRyd7jL3kzZMbhxutnLLsiKgZgtgsQ5+hcrLyWZCSZxHPKPj7kAKow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPRHN0cAMLTe6bWzUG8nVg1csWqiH52wfChWaqBBLtXQIgHR7QoU0cq3IXhkFwL1hJtdPgGtfNehb2C/S8syFWqok="}]}},"0.7.2":{"name":"fetch-polyfill","version":"0.7.2","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/github/fetch.git"},"licenses":[{"type":"MIT","url":"https://github.com/github/fetch/blob/master/LICENSE"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"d8a8180dcae840f0ec22948b30894b6fa93a1d29","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/github/fetch/issues"},"homepage":"https://github.com/github/fetch#readme","_id":"fetch-polyfill@0.7.2","scripts":{},"_shasum":"95b5eae7e4240cdbbc5f605d706ab4f1b603b501","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"95b5eae7e4240cdbbc5f605d706ab4f1b603b501","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.7.2.tgz","integrity":"sha512-PLwQtketxFE31ghT1zh4rvBslk54hatnlYDf8tHicgp6W9tlPThQ5cQ2iFt41g+/XsCBw04nA7N0QN5vOnaYwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDAiwHjs0VnbL6jGd4ZQ2XBLaBUzY3sNQi03RsZtNjlbAiBKO837cAVmzVprOH4bop8RR15AAIOdDHvhT6sw2Bp5tQ=="}]}},"0.7.3":{"name":"fetch-polyfill","version":"0.7.3","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"licenses":[{"type":"MIT","url":"http://mit-license.org/undozen"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"825df0b54dec0979e73c8faca7b4657c0dfb8d1f","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/undozen/fetch/issues"},"homepage":"https://github.com/undozen/fetch#readme","_id":"fetch-polyfill@0.7.3","scripts":{},"_shasum":"f002db4987b221959f24690cb61be61c3aa7766f","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"f002db4987b221959f24690cb61be61c3aa7766f","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.7.3.tgz","integrity":"sha512-FFryu8atl51G3FNUfYiOwmKGSJp5OmcIzah0S0xXdBR0eLj7ZU1OXtM3WKD4P85KEwarVc9q9xu8ZvzBW/tVlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFDIijCEBbY98VE0TbmOk+mkxCucCm7MyBwIY6V1t82AiEAoKTKocE8tlxTrnOOOl489QRg5Ql4pGT2WIjhSDSzPmc="}]}},"0.7.4":{"name":"fetch-polyfill","version":"0.7.4","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"licenses":[{"type":"MIT","url":"http://mit-license.org/undozen"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"078d955f857d10057c617f752965d736c5d43318","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/undozen/fetch/issues"},"homepage":"https://github.com/undozen/fetch#readme","_id":"fetch-polyfill@0.7.4","scripts":{},"_shasum":"1e80e2a0800b3f15332103ec25e44efa3098cf0e","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"1e80e2a0800b3f15332103ec25e44efa3098cf0e","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.7.4.tgz","integrity":"sha512-E6SRJXXOUewJyEPiMvnLM/XwBwYpgtUWn3/7oKy0r0Aw5pqsybfk7dQPAyGtA/RLMNHDA+t5sMukHq6x4C3wmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9XeSBDiyvcNzgtcgeo3Je/IkSft1hORWlpRPJJjNwNQIgceMNAEd8tAMXzcANsEgCb4slZQtjWFq95c/wvG6FxIs="}]}},"0.7.5":{"name":"fetch-polyfill","version":"0.7.5","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"licenses":[{"type":"MIT","url":"http://mit-license.org/undozen"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"ee623e52ebe7ecc09ca5496d798d181e974e7f51","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/undozen/fetch/issues"},"homepage":"https://github.com/undozen/fetch#readme","_id":"fetch-polyfill@0.7.5","scripts":{},"_shasum":"f70293fc119c21e84ea88863b9e0b45b4e3903e0","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"f70293fc119c21e84ea88863b9e0b45b4e3903e0","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.7.5.tgz","integrity":"sha512-vqEHR7l1YUXeZD/UqsmrJWL7Td6Dz6Vzfh9UYjeKpdF7xy+NWmfLeqs3f0ILyifa6DmDDU3zkEu65RdvCL8j+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEHHdcOsqy4bSZmhDXdH9ChdkA80ueNvG+TifpkgCEnAiAiZmaXR2q9WKzn2EN1JOBcsPm6N+SVSgqAPghURzBczg=="}]}},"0.7.6":{"name":"fetch-polyfill","version":"0.7.6","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"licenses":[{"type":"MIT","url":"http://mit-license.org/undozen"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"a45f039eadd819216ecb7487ab1142c43a1d63ec","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/undozen/fetch/issues"},"homepage":"https://github.com/undozen/fetch#readme","_id":"fetch-polyfill@0.7.6","scripts":{},"_shasum":"2677bf1105a9ccc5f7ca4cfaf32ff560c5120ca5","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"2677bf1105a9ccc5f7ca4cfaf32ff560c5120ca5","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.7.6.tgz","integrity":"sha512-YupIICpcJaBTcW8pCUQngUQ3/jfP8T8cedcm1giiZMQ0dS5jf7Rk9pdER+TqK4BQs3WOoDzJHdqQawbPWOnmRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1WyZM2NAvhjwYLJRTMkF+0Z/sqJsZZszyc/ioio39qAiBSaJhUk2Qqyu31IoUEOUOd0wC8KUAGWPVHcM3ADvS8wA=="}]}},"0.8.1":{"name":"fetch-polyfill","version":"0.8.1","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"licenses":[{"type":"MIT","url":"http://mit-license.org/undozen"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"96219152293b8fe9fb8e032b298802be5578d01d","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/undozen/fetch/issues"},"homepage":"https://github.com/undozen/fetch#readme","_id":"fetch-polyfill@0.8.1","scripts":{},"_shasum":"13ba0b2470897de0d2778edaf6888cb637fe20ec","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"13ba0b2470897de0d2778edaf6888cb637fe20ec","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.8.1.tgz","integrity":"sha512-MNR7PTZThfyFUppoKQfF4IpYizhcfCIsWzA3PRMZIaz8PB4j9qGE9u90SvFy7FMpCggC/nYuNruXd2wehN5iVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfmTpbgdR+UQa5I7rya3rU3rk4e+eU79AyN3aMBDgg9gIhAP3O0INqAqE/Ra+uzaZ25FX2iepkRVz85Z/p7Y/gi8LR"}]}},"0.8.2":{"name":"fetch-polyfill","version":"0.8.2","main":"fetch.js","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"licenses":[{"type":"MIT","url":"http://mit-license.org/undozen"}],"devDependencies":{"browserify":"^9.0.8","es6-promise":"^2.1.1","isarray":"0.0.1","jshint":"2.5.2","mocha":"2.1.0"},"files":["LICENSE","fetch.js"],"gitHead":"4acdd51d0fd7b99a9aac09d092e23d939dd6db15","description":"**This fork supports IE8 with es5-shim, es5-sham and es6-promise**","bugs":{"url":"https://github.com/undozen/fetch/issues"},"homepage":"https://github.com/undozen/fetch#readme","_id":"fetch-polyfill@0.8.2","scripts":{},"_shasum":"3e1486442da5b53c43e66a6951eaa0fd5d23f1ac","_from":".","_npmVersion":"2.9.0","_nodeVersion":"1.8.4","_npmUser":{"name":"undozen","email":"undozen@creditcloud.com"},"maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"dist":{"shasum":"3e1486442da5b53c43e66a6951eaa0fd5d23f1ac","tarball":"https://registry.npmjs.org/fetch-polyfill/-/fetch-polyfill-0.8.2.tgz","integrity":"sha512-HnMXyMscl9drfxTsIgEBOgrEgFH1hq+223eCSQud7blPVhprK1ObBi0TA8KqGa7Ro22nrlwNz2XOtx9uwVXsCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfXGE2K2R7VHePR+Po7U7O7sxWoi67BajlA9kDORxxwAiAPRTw50eW0+4/EJIcA5zCG6uGKYi5LEQdkMCfichJ56w=="}]}}},"readme":"# window.fetch polyfill\n\n**This fork supports IE8 with es5-shim, es5-sham and es6-promise**\n\n**This module is out of maintanance, use [fetch-ie8](https://www.npmjs.com/package/fetch-ie8) instead.**\n\nThe global `fetch` function is an easier way to make web requests and handle\nresponses than using an XMLHttpRequest. This polyfill is written as closely as\npossible to the standard Fetch specification at https://fetch.spec.whatwg.org.\n\n## Installation\n\nAvailable on [Bower](http://bower.io) as **fetch-polyfill**.\n\n```sh\n$ bower install fetch-polyfill\n```\n\nYou'll also need a Promise polyfill for older browsers.\n\n```sh\n$ bower install es6-promise\n```\n\nThis can also be installed with `npm`.\n\n```sh\n$ npm install fetch-polyfill --save\n```\n\n(For a node.js implementation, try [node-fetch](https://github.com/bitinn/node-fetch))\n\n## Usage\n\nThe `fetch` function supports any HTTP method. We'll focus on GET and POST\nexample requests.\n\n### HTML\n\n```javascript\nfetch('/users.html')\n  .then(function(response) {\n    return response.text()\n  }).then(function(body) {\n    document.body.innerHTML = body\n  })\n```\n\n### JSON\n\n```javascript\nfetch('/users.json')\n  .then(function(response) {\n    return response.json()\n  }).then(function(json) {\n    console.log('parsed json', json)\n  }).catch(function(ex) {\n    console.log('parsing failed', ex)\n  })\n```\n\n### Response metadata\n\n```javascript\nfetch('/users.json').then(function(response) {\n  console.log(response.headers.get('Content-Type'))\n  console.log(response.headers.get('Date'))\n  console.log(response.status)\n  console.log(response.statusText)\n})\n```\n\n### Post form\n\n```javascript\nvar form = document.querySelector('form')\n\nfetch('/query', {\n  method: 'post',\n  body: new FormData(form)\n})\n```\n\n### Post JSON\n\n```javascript\nfetch('/users', {\n  method: 'post',\n  headers: {\n    'Accept': 'application/json',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    name: 'Hubot',\n    login: 'hubot',\n  })\n})\n```\n\n### File upload\n\n```javascript\nvar input = document.querySelector('input[type=\"file\"]')\n\nvar form = new FormData()\nform.append('file', input.files[0])\nform.append('user', 'hubot')\n\nfetch('/avatars', {\n  method: 'post',\n  body: form\n})\n```\n\n### Success and error handlers\n\nThis causes `fetch` to behave like jQuery's `$.ajax` by rejecting the `Promise`\non HTTP failure status codes like 404, 500, etc. The response `Promise` is\nresolved only on successful, 200 level, status codes.\n\n```javascript\nfunction status(response) {\n  if (response.status >= 200 && response.status < 300) {\n    return response\n  }\n  throw new Error(response.statusText)\n}\n\nfunction json(response) {\n  return response.json()\n}\n\nfetch('/users')\n  .then(status)\n  .then(json)\n  .then(function(json) {\n    console.log('request succeeded with json response', json)\n  }).catch(function(error) {\n    console.log('request failed', error)\n  })\n```\n\n### Response URL caveat\n\nThe `Response` object has a URL attribute for the final responded resource.\nUsually this is the same as the `Request` url, but in the case of a redirect,\nits all transparent. Newer versions of XHR include a `responseURL` attribute\nthat returns this value. But not every browser supports this. The compromise\nrequires setting a special server side header to tell the browser what URL it\njust requested (yeah, I know browsers).\n\n``` ruby\nresponse.headers['X-Request-URL'] = request.url\n```\n\nIf you want `response.url` to be reliable, you'll want to set this header. The\nday that you ditch this polyfill and use native fetch only, you can remove the\nheader hack.\n\n## Browser Support\n\n![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)\n--- | --- | --- | --- | --- |\nLatest ✔ | Latest ✔ | 8+ ✔ | Latest ✔ | 6.1+ ✔ |\n","maintainers":[{"name":"undozen","email":"opensource@undozen.com"}],"time":{"modified":"2022-06-18T00:16:37.297Z","created":"2015-04-25T02:19:15.815Z","0.7.1":"2015-04-25T02:19:15.815Z","0.7.2":"2015-04-25T02:41:50.095Z","0.7.3":"2015-04-25T02:46:53.233Z","0.7.4":"2015-04-25T02:52:16.969Z","0.7.5":"2015-04-25T03:01:00.088Z","0.7.6":"2015-05-11T14:04:40.697Z","0.8.1":"2015-05-11T15:50:14.728Z","0.8.2":"2015-12-13T13:51:22.767Z"},"homepage":"https://github.com/undozen/fetch#readme","repository":{"type":"git","url":"git+https://github.com/undozen/fetch.git"},"bugs":{"url":"https://github.com/undozen/fetch/issues"},"readmeFilename":"README.md","users":{"eserozvataf":true,"tianleiyiji123":true,"stone_breaker":true}}