network 0.1.0 network: ^0.1.0 copied to clipboard
Package including hooks for easy works with http package in dart
Package including hooks for easy works with http package in dart.
Key Features • Getting Started • Todo • Credits
Key Features #
- Simple hooks for get / post
- Specify response type (blob\json api)
Getting Started #
Import
import 'package:network/network.dart'
Get request to API:
main() async {
final getResponse = await network.get<network.JsonApiResponse>(
'https://jsonplaceholder.typicode.com/todos/1');
print(getResponse.toMap['title']);
}
Get request Blob:
main() async {
final blobResponse = await network.get(
'https://via.placeholder.com/300');
print(blobResponse.bytes);
}
And... api reference available here
TODO #
- ✅ Get
- ✅ Post
- ✅ Delete
- ✅ Put
- ❌ Decorators (#1)
Credits #
This software uses the following open source packages: