resty 0.1.0 copy "resty: ^0.1.0" to clipboard
resty: ^0.1.0 copied to clipboard

A simple, light and useful http wrapper built above dart's http core library.

example/main.dart

import 'package:resty/resty.dart';

void main(List<String> arguments) async {
  final resty = const Resty(
    // secure: true,
    host: 'www.googleapis.com',
    path: 'books',
    version: 'v1',
  );

  final response = await resty.get('volumes', query: {'q': '{rest}'});

  if (response.isOk) {
    final itemCount = response.json['totalItems'];
    print('Number of books about rest: $itemCount.');
  }
}
4
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A simple, light and useful http wrapper built above dart's http core library.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on resty