fanoos_http 1.1.0

Dart native js
Flutter Android iOS web

A concise and robust Http client for Dart with no need for code generation or reflection.

fanoos_http #

A concise and robust Http client for Dart.

Using fanoos_http you can write concise client code without the need for using reflection or code generation.

Usage #

A simple usage example:

import 'package:fanoos_http/fanoos_http.dart';

const host = 'https://www.blog.com/api/v1';

Future<Post> getPost(int id) => httpGet(
      url: '$host/posts/$id',
      onOk: (json) => Post.fromJson(json),
    );


Future<List<Post>> getPosts() => httpGet(
      url: '$host/posts',
      onOk: (json) => json['posts'].map((p) => Post.fromJson(p)).toList(),
    );

For the full example, please check the example tab.

0
likes
100
pub points
9%
popularity

Publisher

aligator.ir

A concise and robust Http client for Dart with no need for code generation or reflection.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on fanoos_http