Introduction
Nitro Fetch is a modern, lightweight, and extensible HTTP client for JavaScript and TypeScript applications. Designed as a lean alternative to Axios, it builds on the native Fetch API, delivering a familiar developer experience without adding external dependencies.
Whether you're developing a frontend application, an API client, or a server-side script, Nitro Fetch provides a minimal yet powerful API for making HTTP requests, managing endpoints, intercepting request/response flows, and handling retries—efficiently and type-safely.
✨ Key Features
- Promise-based API using the native
fetch
- Request and response interceptors
- Named endpoints for reusable, maintainable HTTP calls
- Automatic retries with customizable logic
- Timeouts, headers, and query parameter configuration
- TypeScript-first with complete type definitions
- Zero dependencies — lightweight and production-ready
📦 Installation
Install Nitro Fetch using your preferred package manager:
- npm
- yarn
- pnpm
- Browser
npm install nitro-fetch
yarn add nitro-fetch
pnpm add nitro-fetch
Using jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/nitro-fetch@1.0.1/dist/umd/nitro-fetch.min.js"></script>
Using unpkg CDN:
<script src="https://unpkg.com/nitro-fetch@1.0.1/dist/umd/nitro-fetch.min.js"></script>
💡 Why Choose Nitro Fetch?
Lightweight by Design
Nitro Fetch is built without any external dependencies. It keeps your bundle size small and your project fast—perfect for modern web applications where performance matters.
Modern JavaScript
It uses the built-in fetch
API available in all modern environments, enhanced with a simple, extensible interface that makes working with HTTP effortless and clean.
Typed and Safe
With full TypeScript support, Nitro Fetch provides autocompletion, type inference, and safer code by default—no extra configuration required.
Extensible Architecture
Add interceptors, define reusable endpoints, and configure retry logic with ease. Nitro Fetch gives you control without the bloat of larger HTTP libraries.
Whether you're migrating from Axios, reducing dependencies, or starting a new TypeScript project from scratch, Nitro Fetch offers a clean, powerful alternative with just the right balance of simplicity and flexibility.
🚀 Ready to make your HTTP requests faster, cleaner, and lighter?
Head over to the Getting Started guide to begin using Nitro Fetch.