Skip to content

bittu-devstudio/api_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api_caller

A lightweight and reusable Dart/Flutter utility for making HTTP API requests easier using the http package.

Features

  • Simplifies GET, POST, and other HTTP methods
  • Optional headers and body support
  • Error handling included
  • Works with RESTful APIs

Getting Started

Add it to your pubspec.yaml:

dependencies:
  api_caller: ^1.0.6


import 'package:api_helper/api_helper.dart';

void fetchData() async {
  final response = await ApiHelper.get('https://jsonplaceholder.typicode.com/posts');
  if (response != null && response.statusCode == 200) {
    print(response.body);
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages