Introduction
Better Fetch
Better Fetch is an advanced fetch wrapper for TypeScript that supports any Standard Schema-compliant validator (like Zod, Valibot, ArkType, etc) for runtime validation and type inference. It features error-as-value handling, pre-defined routes, hooks, plugins and more. Works on the browser, node (version 18+), workers, deno and bun.
Features
Schema Agnostic
Use any Standard Schema compatible validator (Zod, Valibot, ArkType, etc).
Type safety
Advanced type inference and runtime validations powered by Standard Schema.
Smart Parser
Smart response parser for any content type
Fetch Schema
Pre defined routes with schema validations
Extensible
Plugins and hooks to extend the functionality
Advanced Retry
Advanced retry mechanisms
Compatible with fetch and fetch-like APIs
Wraps around fetch and works on the browser, node (version 18+), workers, deno and bun.