{"name":"sync-fetch","version":"0.6.0-1","keywords":["fetch","sync"],"author":{"name":"Lars Willighagen"},"license":"MIT","_id":"sync-fetch@0.6.0-1","maintainers":[{"name":"larsgw","email":"lars.willighagen@gmail.com"}],"homepage":"https://github.com/larsgw/sync-fetch#readme","bugs":{"url":"https://github.com/larsgw/sync-fetch/issues"},"dist":{"shasum":"8a57e58b578c1c431e61cb5d720780671c0e705a","tarball":"http://registry-npm.ywwl.com/sync-fetch/download/sync-fetch-0.6.0-1.tgz","fileCount":12,"integrity":"sha512-UIw2uT+X8jeU/CLwMHoGNjQDLsWq/sZvydmlngaCMc8qAzu3SkO4toNq14RZpEBEDiuWCxgfhyyRWBhEcoocRg==","signatures":[{"sig":"MEUCIDHQFZlvDCp6CEXxifuJxRUXbXV4jfilyBSWOx4c6nvMAiEAiWnAuzaGw0NxA7qg/46Z9OFKOlbcwKDKM2h+FL3DORo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42155,"size":9604,"noattachment":false,"key":"/sync-fetch/-/sync-fetch-0.6.0-1.tgz"},"main":"index.js","unpkg":"bundle.js","browser":"browser.js","engines":{"node":">=18"},"gitHead":"f16e9fb3ef673aa7dac2e7b4b7f802ffd946efa7","scripts":{"lint":"standard","test":"mocha --throw-deprecation test/spec.js","build":"browserify -r .:sync-fetch -o bundle.js","prepare":"npm run build","version":"npm run changelog","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","preversion":"npm run lint && npm run test"},"_npmUser":{"name":"larsgw","email":"lars.willighagen@gmail.com"},"jsdelivr":"bundle.js","repository":{"url":"git+https://github.com/larsgw/sync-fetch.git","type":"git"},"_npmVersion":"10.9.0","description":"Synchronous version of the Fetch API","directories":{},"_nodeVersion":"18.19.1","dependencies":{"node-fetch":"^3.3.2","timeout-signal":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^10.0.0","parted":"^0.1.1","resumer":"0.0.0","standard":"^17.0.0","form-data":"^4.0.0","browserify":"^17.0.0","chai-string":"^1.5.0","chai-iterator":"^3.0.2","string-to-arraybuffer":"^1.0.2","@ungap/url-search-params":"^0.2.2","conventional-changelog-cli":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sync-fetch_0.6.0-1_1732100251157_0.6297183234709696","host":"s3://npm-registry-packages"},"readme":"# sync-fetch\nSynchronous wrapper around the Fetch API. Uses [`node-fetch`](https://github.com/bitinn/node-fetch) under the hood, and for some input-parsing code and test cases too.\n\n[![npm](https://img.shields.io/npm/v/sync-fetch?style=flat-square)](https://npmjs.com/package/sync-fetch)\n[![npm monthly downloads](https://img.shields.io/npm/dm/sync-fetch?style=flat-square)](https://npm-stat.com/charts.html?package=sync-fetch)\n\n## Install\n\n    npm install sync-fetch\n\nIn the browser, a browserify bundle can be loaded from CDNs like unpkg.com.\n\n```html\n<script src=\"https://unpkg.com/sync-fetch\"></script>\n<script src=\"https://unpkg.com/sync-fetch@VERSION\"></script>\n```\n\n## Use\n\n```js\nconst fetch = require('sync-fetch')\n\nconst metadata = fetch('https://doi.org/10.7717/peerj-cs.214', {\n  headers: {\n    Accept: 'application/vnd.citationstyles.csl+json'\n  }\n}).json()\n// arrayBuffer(), blob(), buffer(), json(), and text() supported\n```\n\n## Limitations\n\n### Node.js\n\n  - Does not support `Stream` or `Blob` as input body since they cannot be read or serialized synchronously\n  - Does not support `FormData` as input body yet as it has no built-in method to be serialized\n  - Does not support the non-spec `agent` option as its value cannot be serialized\n  - Does not support non-standard `textConverted()` method on `SyncResponse` and `SyncRequest`\n\n### Browser\n\n  - Does not support most options, since `XMLHttpRequest` is pretty limited. Supported are:\n    - `method`\n    - `body`\n    - `headers`\n    - `credentials` (but not `omit`)\n    - (Non-spec) `timeout`\n  - The non-standard `buffer()` and `textConverted()` methods are not supported\n  - CORS limitations apply, of course (note they may be stricter for synchronous requests)\n","publish_time":1732100251421,"_cnpm_publish_time":1732100251421,"dist-tags":{"latest":"0.7.1"}}