diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index dd238121..2b2b93be 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,7 @@
-
+
@@ -42,19 +42,19 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -64,8 +64,8 @@
-
-
+
+
@@ -117,7 +117,6 @@
- as Map<String, dynamic>
result as Map<String, dynamic>
random_strin
Angel()
@@ -147,6 +146,7 @@
origina
originalBuffer
lazyQue
+ injections
useStream
@@ -246,12 +246,12 @@
-
+
@@ -275,10 +275,65 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -617,14 +672,7 @@
-
-
-
- 1530124843110
-
-
-
- 1530124843111
+
1531146512450
@@ -962,7 +1010,14 @@
1534738209023
-
+
+ 1534794125343
+
+
+
+ 1534794125343
+
+
@@ -998,7 +1053,7 @@
-
+
@@ -1035,7 +1090,7 @@
-
+
@@ -1061,7 +1116,6 @@
-
@@ -1086,7 +1140,8 @@
-
+
+
@@ -1332,13 +1387,6 @@
-
-
-
-
-
-
-
@@ -1367,13 +1415,6 @@
-
-
-
-
-
-
-
@@ -1413,19 +1454,36 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30fafee5..b0f23878 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,4 +29,5 @@ with `Angel.eagerParseRequestBodies`.
replaced with `parseBody`, `parseUploadedFiles`, and `parseRawRequestBuffer`, respectively.
* Removed the synchronous equivalents of the above methods (`body`, `files`, and `originalBuffer`),
as well as `query`.
-* Remove `Angel.injections` and `RequestContext.injections`.
\ No newline at end of file
+* Removed `Angel.injections` and `RequestContext.injections`.
+* Removed `Angel.inject`.
\ No newline at end of file
diff --git a/lib/src/core/server.dart b/lib/src/core/server.dart
index f941b51e..466ac2a2 100644
--- a/lib/src/core/server.dart
+++ b/lib/src/core/server.dart
@@ -45,8 +45,6 @@ class Angel extends Routable {
/// A global Map of converters that can transform responses bodies.
final Map, List>> encoders = {};
- final Map _injections = {};
-
/// A function that is called on every request to create a [Zone], A.K.A an asynchronous
/// execution context.
///
@@ -113,9 +111,6 @@ class Angel extends Routable {
/// These will only not run if a response's `willCloseItself` is set to `true`.
final List responseFinalizers = [];
- /// All global dependencies injected into the application.
- Map get injections => _injections;
-
Container _container;
/// A [Map] of application-specific data that can be accessed by any
@@ -213,7 +208,6 @@ class Angel extends Routable {
viewGenerator = noViewEngineConfigured;
_preContained.clear();
handlerCache.clear();
- _injections.clear();
encoders.clear();
//_serializer = json.encode;
_children.clear();
@@ -256,11 +250,6 @@ class Angel extends Routable {
}
}
- /// Shortcut for adding a middleware to inject a key/value pair on every request.
- void inject(key, value) {
- _injections[key] = value;
- }
-
/// Shortcuts for adding converters to transform the response buffer/stream of any request.
void injectEncoders(Map, List>> encoders) {
this.encoders.addAll(encoders);