Skip to content

Latest commit

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

RequestAPI

A wrapper of Dart http package.

Getting started

import'package:request_api/request_api.dart';
classExampleApi {
staticvoidinit() {
// RequestAPI.init(authority, bearerToken);RequestAPI.init('example.com', 'Bearer Example');
}
staticFuture<Model> getModel(
String arg, {
http.Client client,
}) async {
var data =awaitRequest.get('api/model/$arg', client: client);
var parser = () =>parseItem<Model>(
data.body,
Model.fromJson,
);
var result =awaittryParse(parser);
return result;
}
}

IMPORTANT: outdated Readme.

About

A wrapper of Dart http package.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages