Logo

Package including hooks for easy works with http package in dart.

Pub

Key FeaturesGetting StartedTodoCredits

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

  • x Get
  • x Post
  • x Delete
  • x Put
  • Decorators (#1)

Credits

This software uses the following open source packages:

Libraries

network