api_caller 2.0.1
api_caller: ^2.0.1 copied to clipboard
A flexible API helper built on Dio with support for singleton usage, dynamic base URL override, per-request bearer token, JSON & FormData requests, and typed responses.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add api_callerWith Flutter:
$ flutter pub add api_callerThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
api_caller: ^2.0.1Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:api_caller/api_helper.dart';
import 'package:api_caller/models/api_helper_path_item.dart';
import 'package:api_caller/models/api_helper_request_type.dart';
import 'package:api_caller/models/custom_response.dart';