kd_api_call

Last updated:

0 purchases

kd_api_call Image
kd_api_call Images
Add to Cart

Description:

kd api call

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




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
Installation
Initialization
Usage
Parameters and Response Logs
Examples
License
Features and bugs

Getting Started #
First and foremost, welcome to the easy-to-use service method.
Installation #
Add dependency
dependencies:
kd_api_call: ^0.1.0
copied to clipboard
Initialization #
First, import dependeny:
import 'package:kd_api_call/kd_api_call.dart';
copied to clipboard
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);

copied to clipboard
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
|-------------------------------------------------------------------------------------------------------------------------
copied to clipboard
Service Response
|--------------------------------------------------------------------------------------------------------------------------
| API :- https://jsonplaceholder.typicode.com/albums/1
| StatusCode :- 200
| Message :- {"userId": 1, "id": 1, "title": "quidem molestiae enim"
|--------------------------------------------------------------------------------------------------------------------------
copied to clipboard
Features and bugs #
Please file feature requests and bugs at the issue tracker.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.