{"repo":"elbywan/wretch","free":true,"listed":false,"github":"https://github.com/elbywan/wretch","clone":"git clone https://github.com/elbywan/wretch.git","description":"A tiny wrapper built around fetch with an intuitive syntax. :candy:","language":"TypeScript","stars":5179,"topics":["fetch","request","json","formdata","http-client","typescript","javascript","nodejs","http","ajax"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Wretch A tiny ( 1.8KB g-zipped) wrapper built around fetch with an intuitive syntax. f[ETCH] [WR]apper Wretch 3.0 is now live 🎉 ! Check out the Migration Guide for upgrading from v2, and please have a look at the releases and the changelog after each update for new features and breaking changes. And if you like the library please consider becoming a sponsor ❤️. Features wretch is a small wrapper around fetch designed to simplify the way to perform network requests and handle responses. - 🪶 Small - core is less than 1.8KB g-zipped - 💡 Intuitive - lean API, handles errors, headers and (de)serialization - 🧊 Immutable - every call creates a cloned instance that can then be reused safely - 🔌 Modular - plug addons to add new features, and middlewares to intercept requests - 🧩 Isomorphic - compatible with modern browsers, Node.js 22+, Deno and Bun - 🦺 Type safe - strongly typed, written in TypeScript - ✅ Proven - fully covered by unit tests and widely used - 💓 Maintained - alive and well for many years Table of Contents - Quick Start - Motivation - Installation - Compatibility - Usage - Recipes - Api - Addons - Middlewares - Migration Guides - License Quick Start Motivation Because having to write a second callback to process a response body feels awkward. Fetch needs a second callback to process the response body. Wretch does it for you. Because manually checking and throwing every request error code is tedious. Fetch won't reject on HTTP error status. Wretch throws when th","default_branch":null,"files":null,"tree":[],"storefront":"/r/elbywan","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/elbywan/wretch/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}