clean_api_client 0.1.0 copy "clean_api_client: ^0.1.0" to clipboard
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, and DELETE HTTP 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() and clearToken().
  • 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.
1
likes
160
points
296
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight, clean, and reusable REST API client for Dart and Flutter applications with built-in JSON parsing and error handling.

Repository (GitHub)
View/report issues

Topics

#http #rest-api #network #api-client

License

MIT (license)

Dependencies

http, meta

More

Packages that depend on clean_api_client