{"id":15894762,"url":"https://github.com/clayrisser/binary-fetch","last_synced_at":"2025-12-12T04:38:15.106Z","repository":{"id":58237169,"uuid":"86261105","full_name":"clayrisser/binary-fetch","owner":"clayrisser","description":"Fetch binary data with incremental progress from a browser","archived":false,"fork":false,"pushed_at":"2023-07-11T12:28:56.000Z","size":1056,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-12T19:40:36.021Z","etag":null,"topics":["binary","fetch","incremental","progress","request","response","xhr","xmlhttprequest"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/binary-fetch","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clayrisser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-03-26T20:01:28.000Z","updated_at":"2023-07-11T12:29:03.000Z","dependencies_parsed_at":"2023-07-13T14:31:42.025Z","dependency_job_id":null,"html_url":"https://github.com/clayrisser/binary-fetch","commit_stats":null,"previous_names":["jamrizzi/binary-fetch"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbinary-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbinary-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbinary-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayrisser%2Fbinary-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clayrisser","download_url":"https://codeload.github.com/clayrisser/binary-fetch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244630103,"owners_count":20484313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","fetch","incremental","progress","request","response","xhr","xmlhttprequest"],"created_at":"2024-10-06T08:41:35.344Z","updated_at":"2025-12-12T04:38:15.039Z","avatar_url":"https://github.com/clayrisser.png","language":"JavaScript","readme":"# binary-fetch _Beta_\nFetch incremental binary packets from a browser\n\n![](assets/binary-fetch.png)\n\nCurrently, the only way to access the progress from a request or upload in a browser is with the [XMLHttpRequest API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). However, the the progress data from the XMLHttpRequest API does not give you access to the actual binary data that has been recieved.\n\nBinary fetch solves this problem by giving you immediate access to the binary data while it is being recieved.\n\nBinary fetch is loosely based on the [JavaScript fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n\n```bash\nnpm install --save binary-fetch\n```\n\n```js\nimport binaryFetch from 'binary-fetch';\n\nbinaryFetch('http://example.com/file.binary', {\n  method: 'GET'\n}, (res) =\u003e { // fires 1 or more times during request\n  return res.arrayBuffer().then((body) =\u003e {\n    console.log('binary data recieved so far =\u003e');\n    console.log(body);\n  });\n}).then((res) =\u003e { // fires when request is finished\n  return res.arrayBuffer().then((body) =\u003e {\n    console.log('all binary data recieved =\u003e');\n    console.log(body);\n  });\n});\n```\n\n## Support on Beerpay\nHey dude! Help me out for a couple of :beers:!\n\n[![Beerpay](https://beerpay.io/jamrizzi/binary-fetch/badge.svg?style=beer-square)](https://beerpay.io/jamrizzi/binary-fetch)  [![Beerpay](https://beerpay.io/jamrizzi/binary-fetch/make-wish.svg?style=flat-square)](https://beerpay.io/jamrizzi/binary-fetch?focus=wish)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Fbinary-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclayrisser%2Fbinary-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayrisser%2Fbinary-fetch/lists"}