kd_api_call 0.1.1 copy "kd_api_call: ^0.1.1" to clipboard
kd_api_call: ^0.1.1 copied to clipboard

A composable, multi-platform, Future-based API for HTTP requests.

A Future-based library that allows you to make simple HTTP requests.

pub package Null Safety Code size License

This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, and the browser.

Getting Started #

First and foremost, welcome to the easy-to-use service method.

Installation #

Add dependency

dependencies:
  kd_api_call: ^0.1.0

Initialization #

First, import dependeny:

import 'package:kd_api_call/kd_api_call.dart';

Usage #

The top-level functions are the simplest method to utilise this module. They let you make individual HTTP queries with a minimum of fuss:

import 'package:kd_api_call/kd_api_call.dart';

APIRequestInfo requestInfo = APIRequestInfo(
        url: "https://jsonplaceholder.typicode.com/albums/1",
        requestType: HTTPRequestType.GET,
      );

Response apiResponse =
          await ApiCall.instance.callService(requestInfo: requestInfo);

You can find a complete example here

Parameters and Response Logs #

 Service Parameters
|-------------------------------------------------------------------------------------------------------------------------
| ApiType :- GET
| URL     :- https://jsonplaceholder.typicode.com/albums/1
| Header  :- {Content-Type: application/json}
| Params  :- null
|-------------------------------------------------------------------------------------------------------------------------
 Service Response
|--------------------------------------------------------------------------------------------------------------------------
| API        :- https://jsonplaceholder.typicode.com/albums/1
| StatusCode :- 200
| Message    :- {"userId": 1, "id": 1, "title": "quidem molestiae enim"
|--------------------------------------------------------------------------------------------------------------------------

Features and bugs #

Please file feature requests and bugs at the issue tracker.

8
likes
100
pub points
65%
popularity

Publisher

verified publishersutariya-technologies.com

A composable, multi-platform, Future-based API for HTTP requests.

Repository (GitLab)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

connectivity_plus, flutter, http, path

More

Packages that depend on kd_api_call