http_base_helper

Last updated:

0 purchases

http_base_helper Image
http_base_helper Images
Add to Cart

Description:

http base helper

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
// Obtain shared preferences.
final httpBaseHelper = await ApiBaseHelper();

// for get method request.
httpBaseHelper.onNetworkRequesting(methode: METHODE.get, fullURL: "http//...").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, fullURL: "http//..." ,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}');
});

copied to clipboard
All Method Request
//for get request
Method.get
//for post request
Method.post
//for put request
Method.put
//for delete request
Method.delete


copied to clipboard
Copyright & License #
This open source project authorized by https://pub.dev/packages/get , and the license is MIT.

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.