Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: sky/sdk/lib/mojo/net/fetch.dart

Issue 1227373004: Make Sky example game run offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« sky/sdk/lib/mojo/asset_bundle.dart ('K') | « sky/sdk/lib/mojo/asset_bundle.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/mojo/net/fetch.dart
diff --git a/sky/sdk/lib/mojo/net/fetch.dart b/sky/sdk/lib/mojo/net/fetch.dart
index dd3834e66cd0c6c332acb6d163deeec0603f0291..0912fb06df37c4ec9dae9096aebd52518f4da0f1 100644
--- a/sky/sdk/lib/mojo/net/fetch.dart
+++ b/sky/sdk/lib/mojo/net/fetch.dart
@@ -58,3 +58,8 @@ Future<Response> fetchBody(String relativeUrl) async {
ByteData data = await core.DataPipeDrainer.drainHandle(response.body);
return new Response(data);
}
+
+Future<String> fetchString(String relativeUrl) async {
+ Response response = await fetchBody(relativeUrl);
+ return response.bodyAsString();
+}
« sky/sdk/lib/mojo/asset_bundle.dart ('K') | « sky/sdk/lib/mojo/asset_bundle.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698