apsl_api_call 0.0.1 copy "apsl_api_call: ^0.0.1" to clipboard
apsl_api_call: ^0.0.1 copied to clipboard

outdated

A Flutter Package to make API calls with ease.

APSL API Call Package #

A Dart package designed to simplify the process of making API calls and handling exceptions.

Table of Contents #

Features #

  • API Calls: Provides methods for making both regular and multipart API calls.
  • Exception Handling: Handles common exceptions such as no internet, server errors, timeouts, and more.
  • Connectivity Checks: Automatically checks for internet connectivity before making an API call.
  • Predefined Error Messages: Includes a collection of predefined error messages for various API call scenarios.

Installation #

To use the apsl_api_call package, add it as a dependency in your pubspec.yaml file:

dependencies:
  apsl_api_call: ^1.0.0

Usage #

Making an API Call

import 'package:apsl_api_call/apsl_api_call.dart';

// Define your API request information
APIRequestInfoObj requestInfo = APIRequestInfoObj(
    requestType: HTTPRequestType.get,
    url: "https://api.example.com/data",
    headers: {
        "Authorization": "Bearer YOUR_TOKEN"
    },
    serviceName: "GetData"
);

// Make the API call
http.Response response = await ApiCall.callService(requestInfo: requestInfo);

Contributing #

Contributions are welcome! Please read our contributing guidelines to get started.

2
likes
0
points
18
downloads

Publisher

verified publisherappstonelab.com

Weekly Downloads

A Flutter Package to make API calls with ease.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

connectivity_plus, flutter, http, path

More

Packages that depend on apsl_api_call