diff --git a/README.md b/README.md index 9736cd33..4541484f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_client -[![pub 1.0.0-dev+17](https://img.shields.io/badge/pub-1.0.0--dev+17-red.svg)](https://pub.dartlang.org/packages/angel_client) +[![pub 1.0.0-dev+18](https://img.shields.io/badge/pub-1.0.0--dev+18-red.svg)](https://pub.dartlang.org/packages/angel_client) ![build status](https://travis-ci.org/angel-dart/client.svg) Client library for the Angel framework. diff --git a/lib/angel_client.dart b/lib/angel_client.dart index ba6f3e6e..61cbbfb3 100644 --- a/lib/angel_client.dart +++ b/lib/angel_client.dart @@ -21,6 +21,8 @@ abstract class Angel { String authEndpoint: '/auth', String reviveEndpoint: '/auth/token'}); + Future close(); + /// Applies an [AngelConfigurer] to this instance. Future configure(AngelConfigurer configurer) async { await configurer(this); diff --git a/lib/base_angel_client.dart b/lib/base_angel_client.dart index f6d0a5f8..14255033 100644 --- a/lib/base_angel_client.dart +++ b/lib/base_angel_client.dart @@ -124,6 +124,10 @@ abstract class BaseAngelClient extends Angel { } } + Future close() async { + client.close(); + } + @override Service service(String path, {Type type}) { String uri = path.replaceAll(straySlashes, ""); @@ -173,10 +177,6 @@ class BaseAngelService extends Service { return '$head/$tail'; } - Future close() async { - client.close(); - } - Future send(http.BaseRequest request) { if (app.authToken != null && app.authToken.isNotEmpty) { request.headers['Authorization'] = 'Bearer ${app.authToken}'; diff --git a/pubspec.yaml b/pubspec.yaml index 962ceef9..11193d77 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_client -version: 1.0.0-dev+17 +version: 1.0.0-dev+18 description: Client library for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_client