Index: pkg/http/test/utils.dart |
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart |
index 9e9ae8b3408d37c5ab724bd4f8486fe0f41f3f18..a4238cfacb676e8eca6f3190f79979c9b363cb6d 100644 |
--- a/pkg/http/test/utils.dart |
+++ b/pkg/http/test/utils.dart |
@@ -4,6 +4,7 @@ |
library test_utils; |
+import 'dart:async'; |
import 'dart:io'; |
import 'dart:json' as json; |
import 'dart:uri'; |
@@ -104,6 +105,10 @@ void stopServer() { |
_server = null; |
} |
+/// Buffers all input from an InputStream and returns it as a future. |
Bob Nystrom
2013/01/08 23:50:49
Is this a dart:io compatibility thing? If so, docu
nweiz
2013/01/09 00:52:11
Done.
|
+Future<List<int>> consumeInputStream(InputStream stream) => |
+ new http.ByteStream(wrapInputStream(stream)).toBytes(); |
+ |
/// A matcher that matches JSON that parses to a value that matches the inner |
/// matcher. |
Matcher parse(matcher) => new _Parse(matcher); |