AnonX - Anonymous Posting
DP
Anonymous x/DevSpeak
Thread Image
I made a fetch client builder to simplify and validate data fetching

Hey, I recently launched [upfetch](https://github.com/L-Blondy/up-fetch), an advanced fetch client builder. I built it because I kept rewriting the same fetch wrapper for every project. Each time, I needed the same core features:

- Make fetch throw errors to integrate smoothly with libraries like TanStack Query
- Add sensible defaults to the Fetch API, like a base URL and authentication headers
- Validate responses for type safety when OpenAPI isn’t an option

I also wanted the library to feel exactly like using fetch — no new API to learn, and no extra friction for my teammates.

While there are other great options out there, I found many were either too rigid or too bulky. Doesn’t it feel wrong to ship a 14kb fetch library to the client?

To keep up-fetch small and flexible, I took a simple approach: lightweight defaults, paired with inversion of control, so users can easily override what they need.

The result? up-fetch weighs just 1.6kb gzipped, with built-in validation (powered by Standard Schema), configurable options, retries, timeouts, streaming & progress tracking, lifecycle hooks, and more.

Check it out if you’ve got a minute — I’d love to gather some feedback!

Reply 20 hours ago
Replies

No replies yet. Be the first to reply!