Introduction
This section provides an overview of hmm-api v2.0.0.
Tired of manually handling errors and showing toast notifications for every API call in your React, Next.js, or Node.js application? HMM-API v2.0.0 takes API management to the next level with powerful callback systems, enhanced error handling, and improved developer experience!
With HMM-API, you can focus on building your application while it handles the repetitive tasks for you. Whether you're working on a frontend React app or a backend Node.js server, HMM-API provides a consistent, easy-to-use solution for API management.
What it does:
- Automates error handling โ no more try-catch headaches. Displays toast notifications for you (frontend).
- Lets you customize error parsing for relevant messages Works on both frontend (React/Next.js) and backend (Node.js) seamlessly.
- Centralizes global settings for consistency across your app. Focus on building, not boilerplate! ๐ Start using HMM-API and make API management effortless.
Key Features:
- Automatic Error Handling: No more wrapping your API calls in
try-catch
blocks! HMM-API automatically catches and processes errors. - Callback System: Global and per-request success/error callbacks for complete control over API responses.
- Success & Error Notifications: Integrated toast notifications for both success and error states (frontend apps).
- Enhanced Error Parsing: Built-in error parsing with
returnParsedError
option for cleaner error messages. - Finally Callbacks: Cleanup functions that run after every request, perfect for hiding loading states.
- Flexible Configuration: Global settings with per-request overrides for maximum flexibility.
- Credentials Support: Built-in credentials handling for authentication scenarios.
- Node.js Support: Full backend integration with Node.js. Use the same package on both frontend and backend.
Why HMM-API?
- Simplified API Integration: No need to manually wrap each API call in error handling code.
- Cross-Platform Compatibility: Use HMM-API seamlessly in both React/Next.js frontend applications and Node.js backend environments.
- Centralized Configuration: Easily configure global settings, ensuring consistency across your entire application stack.
- Enhanced Developer Experience: By abstracting away common API tasks, developers can focus more on core functionality.
What's New in v2.0.0
- ๐ฏ Callback System: Global and per-request success/error callbacks for complete control
- โจ Success Toasts: Optional global success notifications alongside error handling
- ๐ง Enhanced Error Handling:
returnParsedError
option for cleaner, more readable error messages - ๐ Credentials Support: Global credentials configuration for authentication scenarios
- ๐งน Finally Callbacks: Cleanup functions that run after every request (perfect for hiding loading states)
- โก Per-Request Overrides: Override global callbacks and settings for individual requests
- ๐จ Improved Developer Experience: Better TypeScript support and more intuitive API design
Start using HMM-API v2.0.0 today and experience the next level of API management. With enhanced callback systems, improved error handling, and seamless integration across React, Next.js, and Node.js, you can build your app faster and with fewer headaches.