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

outdated

To make easy for using http request API

HttpBaseHelper Plugin #

Make implementation with http more easier and short.

Examples #

Here are small examples that show you how to use http base helper.

Request Network

dart // Obtain shared preferences. final httpBaseHelper = await ApiBaseHelper();

// for get method request. httpBaseHelper.onNetworkRequesting(methode: METHODE.get, baseUrl: "http//...", url: "/list").then((response) { //here for status code 200 debugPrint("response$response"); }).onError((ErrorModel error, stackTrace) { //here for error status code debugPrint('Status code: ${error.statusCode}'); }); // for post method request. httpBaseHelper.onNetworkRequesting(methode: METHODE.post, baseUrl: "http//...", endPoint: "/product",body: { "id": 1 }).then((response) { //here for status code 200 debugPrint("response$response"); }).onError((ErrorModel error, stackTrace) { //here for error status code debugPrint('Status code: ${error.statusCode}'); });

All Method Request

dart //for get request Method.get //for post request Method.post //for put request Method.put //for delete request Method.delete

This open source project authorized by https://pub.dev/packages/get , and the license is MIT.

2
likes
0
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

To make easy for using http request API

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, get

More

Packages that depend on http_base_helper