+18
This commit is contained in:
parent
59a4a22774
commit
a72c036dd1
4 changed files with 8 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
# angel_client
|
||||
|
||||
[](https://pub.dartlang.org/packages/angel_client)
|
||||
[](https://pub.dartlang.org/packages/angel_client)
|
||||

|
||||
|
||||
Client library for the Angel framework.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -124,6 +124,10 @@ abstract class BaseAngelClient extends Angel {
|
|||
}
|
||||
}
|
||||
|
||||
Future close() async {
|
||||
client.close();
|
||||
}
|
||||
|
||||
@override
|
||||
Service service<T>(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<http.StreamedResponse> send(http.BaseRequest request) {
|
||||
if (app.authToken != null && app.authToken.isNotEmpty) {
|
||||
request.headers['Authorization'] = 'Bearer ${app.authToken}';
|
||||
|
|
|
@ -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 <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_client
|
||||
|
|
Loading…
Reference in a new issue