mikeal/r2 has 4,397 GitHub stars and 116 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 14:43 UTC. Last push 2019-09-01.
HTTP client. Spiritual successor to request.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalr2
Early in Node.js I wrote an HTTP client library called request. It evolved
along with Node.js and eventually became very widely depended upon.
A lot has changed since 2010 and I've decided to re-think what a simple HTTP client library should look like.
This new library, r2, is a completely new approach from request.
- Rather than being built on top of the Node.js Core HTTP library and
shimmed for the browser,
r2is built on top of the browser's Fetch API and shimmed for Node.js. - APIs are meant to be used with async/await, which means they are based on promises.
const r2 = require('r2')
let html = await r2('https://www.google.com').text
Simple JSON support.
let obj = {ok: true}
let resp = await r2.put('http://localhost/test.json', {json: obj}).json
Simple headers support.
let headers = {'x-test': 'ok'}
let res = await r2('http://localhost/test', {headers}).response
Being written to the Fetch API is a huge benefit for browser users.
When running through browserify request is ~2M uncompressed and ~500K compressed. r2 is only 66K uncompressed and 16K compressed.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,941 starspublic-apis/public-apis
A collective list of free APIs
497,204 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
442,648 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,182 stars