clean_api_client 0.1.0
clean_api_client: ^0.1.0 copied to clipboard
A lightweight, clean, and reusable REST API client for Dart and Flutter applications with built-in JSON parsing and 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.
0.1.0 #
Added #
- Initial release of
clean_api_client. - Support for
GET,POST,PUT,PATCH, andDELETEHTTP methods. - Clean
ApiResponse<T>generic model with status code, headers, and parsed data. - Robust URL builder with automatic leading and trailing slash normalization.
- Automatic query parameter encoding and serialization.
- Automatic JSON encoding for request bodies (
Map/List). - Automatic JSON decoding for response bodies.
- Bearer token authentication management with
setToken()andclearToken(). - Default header configuration and request-specific header overrides.
- Configurable global and per-request timeouts.
- Rich exception hierarchy (
ApiException,NetworkException,ApiTimeoutException,UnauthorizedException,ForbiddenException,NotFoundException,ServerException,BadRequestException). - Dependency injection support for
http.Client.