From 9e915fa7d2d2cccb8a608e044f8694d4f419a6c1 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 7 Feb 2018 00:46:59 -0500 Subject: [PATCH] AnonymousService now takes FutureOr --- .idea/workspace.xml | 170 +++++++++++++++------------- CHANGELOG.md | 2 + lib/src/core/anonymous_service.dart | 12 +- 3 files changed, 101 insertions(+), 83 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c6b3edab..eca551b3 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,28 +2,9 @@ - - - - - - - - - - - - - - - - - - - - - + + @@ -59,19 +40,34 @@ - + - - + + - - - + + + + + + + + + + + + + + + + + + @@ -124,7 +120,6 @@ - cacheKey testing cache errorHan @@ -154,6 +149,7 @@ HttpHeaders. = false = true + Future _isClosed @@ -182,6 +178,7 @@ streaming !isOpen 'server' + FutureOr C:\Users\thosa\Source\Angel\framework\lib @@ -208,7 +205,6 @@ @@ -315,6 +312,20 @@ + + + + + + + + + + + + + + @@ -674,14 +685,7 @@ - - - - 1498830956916 - 1498857811360 @@ -1019,7 +1023,14 @@ - @@ -1055,7 +1066,7 @@ - @@ -1090,7 +1101,7 @@ - + @@ -1114,7 +1125,6 @@ @@ -1148,13 +1159,6 @@ - - - - - - - @@ -1294,17 +1298,6 @@ - - - - - - - - - - - @@ -1468,14 +1461,6 @@ - - - - - - - - @@ -1581,14 +1566,6 @@ - - - - - - - - @@ -1597,6 +1574,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index d138c6f9..657a97fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ empty string. * Deprecated all `Angel` methods that directly touch an `HttpServer` or `HttpRequest`. * Created the `AngelHttp` class. * Removed explicit dependence on `dart:io` for `Angel`, `RequestContext`, `ResponseContext`. +* Created `lib/http.dart`, which exports HTTP-specific functionality. +* `AnonymousService` now takes `FutureOr`. # 1.1.0+3 * Modified `ResponseContext#isOpen` to also return `false` if streaming is being used. diff --git a/lib/src/core/anonymous_service.dart b/lib/src/core/anonymous_service.dart index 9e578be1..d263dca6 100644 --- a/lib/src/core/anonymous_service.dart +++ b/lib/src/core/anonymous_service.dart @@ -8,12 +8,12 @@ class AnonymousService extends Service { Function _index, _read, _create, _modify, _update, _remove; AnonymousService( - {Future index([Map params]), - Future read(id, [Map params]), - Future create(data, [Map params]), - Future modify(id, data, [Map params]), - Future update(id, data, [Map params]), - Future remove(id, [Map params])}) + {FutureOr index([Map params]), + FutureOr read(id, [Map params]), + FutureOr create(data, [Map params]), + FutureOr modify(id, data, [Map params]), + FutureOr update(id, data, [Map params]), + FutureOr remove(id, [Map params])}) : super() { _index = index; _read = read;