fetchly library

The fetchly library.

This library provides tools and utilities for making HTTP requests and handling responses. It's built on top of the Dio package, offering a simplified and more specific interface for network operations.

Exports:

  • Dio package: A powerful Dart HTTP client for making HTTP requests.
  • Enumerations: Defines enums used in the library for request handling.
  • Fetch utilities: Contains classes and methods for performing HTTP requests.

Classes

ApiServices
A service class extending Fetchly for managing API-related functionality.
Fetchly
The Fetchly class extends Response to handle HTTP requests.
FetchlyConfig
Configuration class for Fetchly HTTP client.
Request
Request is a data model for holding request details.
Response
Represents a response object with various properties such as status, message, data, body, and request.
ResponseHandler
A utility class for handling HTTP response data.

Enums

PrintType
Defines the types of print behavior for debugging or logging purposes.

Extensions

ApiTestExtension on Response
DioCustomExtension on Dio
A custom extension for the Dio HTTP client.
FetchlyMapExtension on Map<String, dynamic>
A custom extension for converting map data to FormData.

Properties

dio ↔ Dio
The Dio client instance with the configured options.
getter/setter pair

Functions

checkResponse(String jsonPath, Response response, {bool deep = false}) Future<void>
dioOptions({String? baseUrl}) → BaseOptions
Creates a set of base options for Dio HTTP client.