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

A lightweight and easy-to-use Dart/Flutter package to simplify making network API calls. It supports all CRUD operations (Create, Read, Update, Delete) with customizable headers, request bodies, and t [...]

network_caller #

A reusable and clean Flutter package to perform HTTP requests (GET, POST, PUT, DELETE, PATCH) with optional token and custom headers.

Features #

✅ Supports all HTTP methods
✅ Custom headers and bearer token
✅ Clean error handling and response class
✅ Optional JSON encoding

Usage #

import 'package:network_caller/network_caller.dart';

final response = await NetworkCaller.request(
  url: 'https://api.example.com/data',
  method: ApiMethod.post,
  body: {'name': 'John'},
  token: 'your_token_here',
);

if (response.isSuccess) {
  print(response.data);
} else {
  print(response.message);
}
0
likes
120
points
8
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight and easy-to-use Dart/Flutter package to simplify making network API calls. It supports all CRUD operations (Create, Read, Update, Delete) with customizable headers, request bodies, and token-based authentication Features Perform GET, POST, PUT, PATCH, and DELETE requests with a clean and consistent API. Support for passing custom headers including authorization tokens. Handles JSON encoding/decoding automatically.

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on network_caller