{"id":39078239,"url":"https://github.com/carboneio/rock-req","last_synced_at":"2026-01-17T18:28:15.792Z","repository":{"id":151861944,"uuid":"621207784","full_name":"carboneio/rock-req","owner":"carboneio","description":"⚡️ Ultra-light (150 LOC, zero dep.) \u0026 Ultra-fast NodeJS request library with reliable retry on failure, http/https, redirects, gzip/deflate/brotli, extensible, proxy, streams, JSON mode, forms, timeout","archived":false,"fork":false,"pushed_at":"2025-11-14T17:36:10.000Z","size":247,"stargazers_count":96,"open_issues_count":2,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-14T18:28:19.983Z","etag":null,"topics":["http","http-client","https","javascript","node-fetch","nodejs","request","simple-get","superagent"],"latest_commit_sha":null,"homepage":"","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/carboneio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-30T07:50:25.000Z","updated_at":"2025-11-14T17:36:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"8192e643-76d9-43de-a30d-cf40fc782fb6","html_url":"https://github.com/carboneio/rock-req","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/carboneio/rock-req","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carboneio%2Frock-req","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carboneio%2Frock-req/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carboneio%2Frock-req/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carboneio%2Frock-req/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carboneio","download_url":"https://codeload.github.com/carboneio/rock-req/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carboneio%2Frock-req/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:28:00.501Z","status":"ssl_error","status_checked_at":"2026-01-17T18:28:00.150Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["http","http-client","https","javascript","node-fetch","nodejs","request","simple-get","superagent"],"created_at":"2026-01-17T18:28:15.012Z","updated_at":"2026-01-17T18:28:15.770Z","avatar_url":"https://github.com/carboneio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/carboneio/rock-req/master/doc/rock-req-logo.svg\" alt=\"rock-req logo\" height=\"150\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\" style=\"border-bottom:none;\"\u003eRock-req\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e⭐️⭐️ Ensure your HTTP requests always reach their destination as \u003cb\u003eefficiently\u003c/b\u003e as possible! ⭐️⭐️\u003c/p\u003e\n\u003cp align=\"center\"\u003eTested on Mac, Linux, Windows with NodeJS 16, 18, 19, 20, 22, 24, 25\u003c/p\u003e\n\n[![npm][npm-image]][npm-url]  [![ci][ci-image]][ci-url]  [![javascript style guide][standard-image]][standard-url]\n\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n[npm-image]: https://img.shields.io/npm/v/rock-req.svg\n[npm-url]: https://npmjs.org/package/rock-req\n[ci-url]: https://github.com/carboneio/rock-req/actions\n[ci-image]: https://img.shields.io/github/actions/workflow/status/carboneio/rock-req/ci.yml?branch=master\n\n## 🔥 Why?\n\nIn most existing libraries (2025):\n\n- Managing **reliable retries** is difficult, tricky with streams and not battle-tested\n- Using **multiple forward proxies** has several benefits like **higher availability** and **increased bandwidth** but \n  **Intercepting retries** to use another Egress controller between two requests is not possible.\n- Many request libraries are heavy: node-fetch, superagent, needle, got, axios, request\n- Lightweight alternatives are not as light as they claim due to dependencies (simple-get, tiny-req, puny-req, phin, ...)\n\n⚡️ **Rock-req** solves these problems with only **150 lines of code** and **zero dependencies**\n\nIt also supports many features:\n\n- Follows redirects\n- Handles **gzip/deflate/brotli** responses\n- Modify defaults\n- Extend and create new instances\n- Automatically destroy input/output **stream** on error and premature close event\n- **Advanced retries**\n- URL Rewrite\n- **Ultra-fast (\u003e 20k req/s)**\n- Keep Alive by default (3000ms)\n- Composable\n- Timeouts\n- Promises interface\n- HTTPS / HTTP\n- Composes well with npm packages for features like cookies, proxies, form data, \u0026 OAuth\n- Keep 98% of the `simple-get` API (fork source)\n\nWhen the callback is called, the request is 100% finished, even with streams.\n\n\n## 🚀 Benchmark Rock-req vs got, axios, node-fetch, phin, simple-get, superagent, ...\n\nStop using \"slow-by-default\" and \"false-light\" HTTP request libraries!\n\n**2025-11-14 on MacBook Pro M4 Max with all dependencies updated on this date**\n\n\n| Library      | NodeJS 22 | NodeJS 24   | NodeJS 25  | Bun v1.3.2 | LOC (2025/2023) |\n|--------------|-----------:|------------:|---------:|-----------:|----------------:|\n| rock-req 🙋‍♂️  | 26842 ops  | 26782 ops  | 26179 ops  | 21229 ops  | 152 (+5%)      |\n| simple-get   | 26532 ops  | 26802 ops  | 25954 ops  | 21187 ops  | 317 (+0%)      |\n| axios        |  4110 ops  |  3999 ops  |  3996 ops  | 14788 ops  | 19883 (+42%)   |\n| got          | 14786 ops  | 15234 ops  | 15149 ops  | 15287 ops  | 16904 (+83%)   |\n| fetch        | 15676 ops  | 16252 ops  | 15784 ops  | 27675 ops  | 54211 (+306%)  |\n| request      | 17102 ops  | 14586 ops  | 14346 ops  | 18202 ops  | 58057 (+24%)   |\n| superagent   |  3862 ops  |  3979 ops  |  3889 ops  | 19271 ops  | 31913 (+98%)   |\n| phin         | 15549 ops  | 14160 ops  | 13915 ops  | 15430 ops  | 20064 (+5960%) |\n| _undici_*    | 32480 ops  | 33272 ops  | 32738 ops  | 25961 ops  | 23235 (+43%)   |\n\n\n**2023-04-19 on Macbook Pro M1 Max with all dependencies updated on this date**\n\n\n| Library      | NodeJS 16     | NodeJS 18     | NodeJS 20*     | Size deps inc. |\n| ------------ |--------------:|--------------:| --------------:| --------------:|\n| rock-req 🙋‍♂️  | 22816 ops     | 21797 ops     |  21964 ops     |  144 LOC       |\n| simple-get   |  2937 ops     |  3260 ops     |  21258 ops     |   317 LOC      |\n| axios        |  5090 ops     |  4910 ops     |   3196 ops     | 13983 LOC      |\n| got          |  2163 ops     |  1762 ops     |   9961 ops     |  9227 LOC      |\n| fetch        |  2101 ops     |  2102 ops     |   2020 ops     | 13334 LOC      |\n| request      |  2249 ops     |  1869 ops     |  15815 ops     | 46572 LOC      |\n| superagent   |  2776 ops     |  2100 ops     |   2895 ops     | 16109 LOC      |\n| phin         |  3178 ops     |  1164 ops     |  21299 ops     |   331 LOC      |\n| _undici_*    | 24095 ops     | 24378 ops     |  24191 ops     | 16225 LOC      |\n\n\n\u003e `LOC` = Lines of Code, including dependencies (excluding dev dependencies)\n\u003e `ops` = request per second\n\n\u003e Since Node.js 20, HTTP keep-alive is activated by default, just like in `rock-req`.  This improves the overall performance of all frameworks.\n\n\u003e `undici` is a low-level API and a faster alternative to the native Node.js HTTP module. It represents the performance ceiling for Node.js.\n\n\u003e `rock-req` uses only the native Node.js HTTP module and provides many high-level features — far more than `phin` and `simple-get` — with fewer lines of code.\n\n\u003e Interestingly, the differences are less visible on Bun.sh.\n\n## Install\n\n```bash\n  npm install rock-req\n```\n\n## Documentation\n\n[The full documentation is here](doc/api.md) to reduce Node package file size.\n\n## Supporters\n\nThis packaged in maintained by Carbone:\n\n\u003cp\u003e\n  \u003ca href=\"https://carbone.io\" alt=\"Carbone.io - Efficient PDF / DOCX / XLSX / CSV / HTML / XML generator with templates and JSON\"\u003e\n    \u003cimg src=\"https://carbone.io/img/carbone-logo.svg\" alt=\"Carbone.io logo\" height=\"60\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\nThank you [Feross Aboukhadijeh](https://github.com/feross), creator of `simple-get` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarboneio%2Frock-req","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarboneio%2Frock-req","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarboneio%2Frock-req/lists"}