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

Unified Diff: samples/total/src/GetSpreadsheet.dart

Issue 8292003: Total now reads mortgage sample from server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Process stdout and stderr renames Created 9 years, 2 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
« no previous file with comments | « samples/total/src/Dartc.dart ('k') | samples/total/src/SYLKProducer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/total/src/GetSpreadsheet.dart
diff --git a/samples/total/src/GetSpreadsheet.dart b/samples/total/src/GetSpreadsheet.dart
new file mode 100644
index 0000000000000000000000000000000000000000..0d7a1d7d01e18099c30f98fa67e624ca8b0a7874
--- /dev/null
+++ b/samples/total/src/GetSpreadsheet.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class GetSpreadsheet {
+
+ static void getSample(HTTPRequest req, HTTPResponse res) {
+ switch (req.method) {
+ case 'GET':
+ String name = req.queryParameters['name'];
+ res.writeString(new SYLKProducer().makeExample(name));
+ res.writeDone();
+ break;
+ case 'POST': // Fall through intended
+ default:
+ res.statusCode = HTTPStatus.METHOD_NOT_ALLOWED;
+ res.writeDone();
+ break;
+ }
+ }
+
+ static void listSamples(HTTPRequest req, HTTPResponse res) {
+ switch (req.method) {
+ case 'GET':
+ res.writeString(new SYLKProducer().listSamples());
+ res.writeDone();
+ break;
+ case 'POST': // Fall through intended
+ default:
+ res.statusCode = HTTPStatus.METHOD_NOT_ALLOWED;
+ res.writeDone();
+ break;
+ }
+ }
+}
+
+
+
« no previous file with comments | « samples/total/src/Dartc.dart ('k') | samples/total/src/SYLKProducer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698