DEV Community

Ramadan Ahmed
Ramadan Ahmed

Posted on

axios has 50 million weekly downloads. I built something better.

**axios is used by Spotify, Trello, and Medium. It's the default HTTP client for most Node.js projects. But it hasn't kept up with where Node.js is going.
It doesn't run on Cloudflare Workers. It doesn't run on Vercel Edge Functions. It weighs 35KB. It has no built-in retry. No request deduplication. No upload progress. And every production app ends up writing the same wrapper around it.
I got tired of writing that wrapper. So I built @firekid/hurl.

npm install @firekid/hurl

Before — axios:
const client = axios.create({ baseURL: 'https://api.example.com' })

client.interceptors.request.use((config) => {
config.headers.Authorization = Bearer ${token}
return config
})

try {
const res = await client.get('/users')
console.log(res.data)
} catch (err) {
if (err.response) console.log(err.response.status)
}
After — hurl:
hurl.defaults.set({
baseUrl: 'https://api.example.com',
auth: { type: 'bearer', token },
retry: 3,
})

const res = await hurl.get('/users')
console.log(res.data)

Same result. Half the code. Retry built in for free.
What hurl ships with that axios doesn't:
Built on native fetch, runs everywhere fetch runs. Cloudflare Workers, Vercel Edge, Deno, Bun, Node 18+. No adapters needed.
Retry with exponential backoff built in. Auth helpers for Bearer, Basic, and API key. Upload and download progress. Request deduplication. In-memory caching with TTL. Debug mode. Full TypeScript. Zero dependencies.
And it throws on 4xx and 5xx automatically. No more checking err.response manually.
For a production app:
const api = hurl.create({
baseUrl: 'https://api.example.com',
auth: { type: 'bearer', token: process.env.API_TOKEN },
retry: 3,
timeout: 8000,
})

const users = await api.get('/users')
const post = await api.post('/posts', { title: 'hello' })

axios isn't going anywhere. But if you're starting a new project in 2026, especially one targeting edge runtimes, there's a better option now.
npm: npmjs.com/package/@firekid/hurl
GitHub: github.com/Firekid-is-him/hurl
Docs at: https://github.com/Firekid-is-him/hurl/blob/main/README.md

ENJOY and give feedback♥️**

Top comments (0)