
I got tired of writing the same axios wrapper on every project, so I built this
**Every project I worked on had the same file. Some version of lib/http.ts or utils/api.ts that did the exact same thing, wrap axios, add retry logic, handle auth, set a base URL, catch errors properly. Copy paste. Rename. Repeat. After doing this for the fifth time I thought, why am I still doing this? The problem isn't axios itself. Axios is fine. But it's missing things that every production app needs, and you end up building them yourself every single time: You want retries? Write it yourself. You want timeout that actually works? Write it yourself. You want upload progress? Axios doesn't even support it. You want request deduplication? Good luck. And then there's request, deprecated since 2020, still getting millions of downloads a week because nothing properly replaced it. So I built @firekid/hurl. Before import axios from 'axios' const client = axios.create({ baseURL: ' https://api.example.com ' }) client.interceptors.request.use((config) => { config.headers.Authorization = Bear
Continue reading on Dev.to Webdev
Opens in a new tab




