0 purchases
dio client
This is a simplified implementation of Dio
it targets junior developers that need to quickly have http implementation in their
applications.
Features #
This package has only four (4) methods for now, viz are:
getRequest
postRequest
updateRequest
deleteRequest
Getting started #
Kindly initialize the DioClient object with your baseUrl and start accessing the
methods.
Usage #
///[baseUrl]
const baseUrl = 'https://jsonplaceholder.typicode.com';
///[Dioclient] object instantiation
final dioClient = DioClient(baseUrl: baseUrl);
try{
///calling of the methods
final response = await dioClient.getRequest(path: '/posts');
if(response.statusCode == 200){
debugPrint(response.data);
}else{
debugPrint(response.statusMessage);
}
}on Exception catch(e){
debugPrint('Error: $e');
}
copied to clipboard
Additional information #
More information can be found on Website
Credits goes to Dio contributors as this package depends on it.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.