nxfetcher
v1.0.5
Published
A simple and flexible fetch wrapper for Next.js with base URL configuration.
Maintainers
Readme
🚀 nxfetcher: The Ultimate Fetch Utility for Next.js 🌟
A lightweight and easy-to-use fetch utility designed specifically for Next.js applications. With nxfetcher, you can simplify your data fetching while handling errors, retries, and customizable configurations with ease.
🚀 Features
- Customizable Base URL: Easily configure the base URL for your API requests with
setBaseUrl(). - Support for HTTP Methods: Includes support for
GET,POST,PUT,PATCH, andDELETErequests. - Retry Logic: Automatically retries failed requests with customizable retry limits and delays.
- Error Handling: Graceful error handling with detailed error messages for different HTTP errors.
- Flexible Request Configuration: Customize headers, body data, and other options for every request.
📦 Installation
To install nxfetcher in your Next.js project, simply run:
npm install nxfetcher