dio_http_util 1.0.0
dio_http_util: ^1.0.0 copied to clipboard
A powerful HTTP utility package based on Dio with configurable header injection and unified error handling.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 2024-01-XX #
Added #
- Initial release
- HTTP request utility based on Dio
- Configurable header injection (static and dynamic)
- Unified API response wrapper (
ApiResponse<T>) - Automatic error handling with customizable callbacks
- Type-safe HTTP method constants (
hmclass) - Support for GET, POST, PUT, DELETE, PATCH methods
- Request/response interceptors
- Global
httpinstance for simplified usage
Features #
HttpConfigclass for flexible configuration- Static headers support
- Dynamic header builder for runtime header generation
- Custom error handler callback
- Network error handling
- 500 error detection and handling
- Response status code validation (all codes treated as valid)