{"_id":"svix-fetch","_rev":"3-3e992cc607bee213b8d7507bfa1851fc","name":"svix-fetch","dist-tags":{"latest":"4.0.0"},"versions":{"3.0.0":{"name":"svix-fetch","version":"3.0.0","author":{"name":"Matt Andrews","email":"matt@mattandre.ws"},"license":"MIT","_id":"svix-fetch@3.0.0","maintainers":[{"name":"svixdev","email":"packaging+npm@svix.com"}],"contributors":[{"name":"Svix Inc.","email":"support@svix.com"}],"homepage":"https://github.com/svix/svix-fetch/issues","bugs":{"url":"https://github.com/svix/svix-fetch/issues"},"dist":{"shasum":"c13e20b69ceb3ad43b52dd3933ec30bf278c571d","tarball":"https://registry.npmjs.org/svix-fetch/-/svix-fetch-3.0.0.tgz","fileCount":11,"integrity":"sha512-rcADxEFhSqHbraZIsjyZNh4TF6V+koloX1OzZ+AQuObX9mZ2LIMhm1buZeuc5BIZPftZpJCMBsSiBaeszo9tRw==","signatures":[{"sig":"MEUCIQDW7k0VRBJ0wvnaFr74RoG5YK9DVDS6ajAtERo73FgJxwIgSSQRvvaAqbMD7rc8GmzFspLUgDcTGlABTAjwF+aYLKU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6JEECRA9TVsSAnZWagAA8FYQAICEuyaxWe+UV52R7iAf\nyh8oLP/oFeyNx7zQVJ2aPaKQs/FntkwYqvGZCmeCRVRDkDy+Oj6m6sQE/rrI\nh0huPwkUijnerasdMY8VN/piJQUeM90Q5hqSQK49XntvCF6Sk1Og9YjXWDnG\nDN63V86PrY3RnBl7w+QRZnYbi/JpVA8/6Twk3uKidc429SsKoOC3mYqhd1lk\nvyZ0j2rp6W7VN9Zo6NVX5NBBmib47d4xJOou8C57OhOL4syPGmi92ASMISc0\nRzFvfIptNO21K5ekE1hCxQfhDuPjeh33zo2JANFKtk3Cxn/nDoaMYYbwRUrb\nJO0Y6P0vEqJF9esqJMKQodT7782qoe/eSn5AVtmyK5PFVZGIKlXE1VTphavw\nd5zYW2bt4eKm6hUi96jGgNnma4SK4NsXXqtqij0cDvTZCYNAJY3xHpX4/PX5\ns0wa8S0M5So7AwsWZjNtO8ABFhuNvj9zqam4ylDoR+gTh4olYqOsO1lEi9uB\nckMW/YIX0Z41nUKqFu4+PswNgBrS6YvVzN2oDvu6KB+D+RBRhPPeKeSF0m5v\n1hSzgmybtqe9oQ+MRX8wUGGd27aLrFbvRIcrdYm2twFu8i8L3Ri/LLEF+PbE\n88vDg/RaegakB3YqQK2wQOOlrZRFNcQOvaf6yflW4btjcB52ZmIyToFT1W1Q\nZrfQ\r\n=6LH8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"fetch-npm-node.js","browser":"fetch-npm-browserify.js","gitHead":"ec05dee1e0874ae6ec0b2c617e3618aa59b48919","scripts":{"test":"jshint `npm run -s files` && lintspaces -i js-comments -e .editorconfig `npm run -s files` && mocha","files":"find . -name '*.js' ! -path './node_modules/*' ! -path './bower_components/*'"},"_npmUser":{"name":"svixdev","email":"packaging+npm@svix.com"},"repository":{"url":"git+https://github.com/svix/svix-fetch.git","type":"git"},"_npmVersion":"8.2.0","description":"An isomorphic WHATWG Fetch API, for Node & Browserify with keepalives","directories":{},"_nodeVersion":"14.17.0","dependencies":{"node-fetch":"^2.6.1","whatwg-fetch":"^3.4.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","nock":"^13.0.4","mocha":"^8.1.3","jshint":"^2.5.11","lintspaces-cli":"^0.7.1"},"_npmOperationalInternal":{"tmp":"tmp/svix-fetch_3.0.0_1642631428313_0.8170234904915674","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"svix-fetch","version":"4.0.0","description":"An isomorphic WHATWG Fetch API, for Node & Browserify with keepalives","browser":"fetch-npm-browserify.js","main":"fetch-npm-node.js","scripts":{"files":"find . -name '*.js' ! -path './node_modules/*' ! -path './bower_components/*'","test":"jshint `npm run -s files` && lintspaces -i js-comments -e .editorconfig `npm run -s files` && mocha"},"repository":{"type":"git","url":"git+https://github.com/svix/svix-fetch.git"},"author":{"name":"Matt Andrews","email":"matt@mattandre.ws"},"contributors":[{"name":"Svix Inc.","email":"support@svix.com"}],"license":"MIT","bugs":{"url":"https://github.com/svix/svix-fetch/issues"},"homepage":"https://github.com/svix/svix-fetch/issues","dependencies":{"node-fetch":"^2.6.1","whatwg-fetch":"^3.4.1"},"devDependencies":{"chai":"^5.2.0","jshint":"^2.5.11","lintspaces-cli":"^1.0.0","mocha":"^11.1.0","nock":"^14.0.4"},"overrides":{"node-fetch":{"whatwg-url":"14.2.0"}},"_id":"svix-fetch@4.0.0","gitHead":"31a0d27c0445ba48bc40d211087295e07f57c3a5","_nodeVersion":"23.9.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-KgF174lu8n6tG1A+x6qUjamOoksp8u8tkQtPfQz79p4UWyMK7sj70VqKV08RNYhcER0tElosuCy0g32m4ceJfQ==","shasum":"66ccf1a3262be69e171f252e83e3f6ca42ef8e35","tarball":"https://registry.npmjs.org/svix-fetch/-/svix-fetch-4.0.0.tgz","fileCount":11,"unpackedSize":6418,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCRlp7BmfbbFWFpqHV1pEb5h/jKf1tHhUCzTwUcIBPeXwIhAM+lLBVb7hLS+5nt0zWIKVaw0APiy0bp+kZl81Kd6irg"}]},"_npmUser":{"name":"svixdev","email":"packaging+npm@svix.com"},"directories":{},"maintainers":[{"name":"svixdev","email":"packaging+npm@svix.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/svix-fetch_4.0.0_1745843375256_0.7289948037151475"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-19T22:30:28.313Z","modified":"2025-04-28T12:29:35.603Z","3.0.0":"2022-01-19T22:30:28.691Z","4.0.0":"2025-04-28T12:29:35.421Z"},"bugs":{"url":"https://github.com/svix/svix-fetch/issues"},"author":{"name":"Matt Andrews","email":"matt@mattandre.ws"},"license":"MIT","homepage":"https://github.com/svix/svix-fetch/issues","repository":{"type":"git","url":"git+https://github.com/svix/svix-fetch.git"},"description":"An isomorphic WHATWG Fetch API, for Node & Browserify with keepalives","contributors":[{"name":"Svix Inc.","email":"support@svix.com"}],"maintainers":[{"name":"svixdev","email":"packaging+npm@svix.com"}],"readme":"<h1 align=\"center\">\n  <a href=\"https://www.svix.com\">\n    <img width=\"120\" src=\"https://avatars.githubusercontent.com/u/80175132?s=200&v=4\" />\n    <p align=\"center\">Svix - Webhooks as a service</p>\n  </a>\n</h1>\n\nsvix-fetch is a fork of Matthew Andrew's wonderful WHATWG Fetch polyfill for node and bowserfy: [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch).\n\nThe main purpose of this fork is to enable keepalives when running in a node context.\n\nUnless you have a specific need for this functionality we recommend using [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch).\n\n## Installation\n\n### NPM\n\n```sh\nnpm install --save svix-fetch\n```\n\n### Bower\n\n```sh\nbower install --save svix-fetch\n```\n\n## Usage\n\n```js\nrequire('svix-fetch');\n\nfetch('//offline-news-api.herokuapp.com/stories')\n\t.then(function(response) {\n\t\tif (response.status >= 400) {\n\t\t\tthrow new Error(\"Bad response from server\");\n\t\t}\n\t\treturn response.json();\n\t})\n\t.then(function(stories) {\n\t\tconsole.log(stories);\n\t});\n```\n\n## License\n\nThis code is licenced under the MIT licence.  Based on [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) by **[matthew-andrews](https://github.com/matthew-andrews)**.\n\n## Alternatives\n\n- [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch).\n- [cross-fetch](https://github.com/lquixada/cross-fetch#why-not-isomorphic-fetch)\n- Using [node-fetch](https://github.com/node-fetch/node-fetch) and the [Fetch polyfill](https://github.com/github/fetch) directly (or from [polyfill.io](https://polyfill.io), or relying on [the browser's implementation of the Fetch API](https://caniuse.com/fetch)).\n","readmeFilename":"README.md"}