Nigeria No1. Music site And Complete Entertainment portal for Music Promotion WhatsApp:- +2349077287056
Wednesday, 26 March 2025
Show HN: I made a fetch client builder to make API calls simpler and safer https://bit.ly/4iI9lZC
Show HN: I made a fetch client builder to make API calls simpler and safer I built this library 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! https://bit.ly/4iGGtRd March 26, 2025 at 01:11PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment