Introduction
Better fetch is advanced fetch wrapper for typescript. It supports error as value, zod schema validations, advanced type inference, pre-defined routes, hooks, plugins and more. Works on the browser, node (version 18+), workers, deno and bun.
Features
Type safety
Advanced type inference and runtime validations with zod
Smart Parser
Smart response parser for any content type
Fetch Schema
Pre defined routes with zod schema validations
Extensible
Plugins and hooks to extend the functionality
Advanced Retry
Advanced retry mechanisms with linear and exponential backoff strategies or custom retry conditions
Compatible with fetch and fetch-like APIs
Wraps around fetch and works on the browser, node (version 18+), workers, deno and bun out of the box but can also use custom fetch implementations like node-fetch