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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/total/src/Dartc.dart ('k') | samples/total/src/SYLKProducer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 class GetSpreadsheet {
6
7 static void getSample(HTTPRequest req, HTTPResponse res) {
8 switch (req.method) {
9 case 'GET':
10 String name = req.queryParameters['name'];
11 res.writeString(new SYLKProducer().makeExample(name));
12 res.writeDone();
13 break;
14 case 'POST': // Fall through intended
15 default:
16 res.statusCode = HTTPStatus.METHOD_NOT_ALLOWED;
17 res.writeDone();
18 break;
19 }
20 }
21
22 static void listSamples(HTTPRequest req, HTTPResponse res) {
23 switch (req.method) {
24 case 'GET':
25 res.writeString(new SYLKProducer().listSamples());
26 res.writeDone();
27 break;
28 case 'POST': // Fall through intended
29 default:
30 res.statusCode = HTTPStatus.METHOD_NOT_ALLOWED;
31 res.writeDone();
32 break;
33 }
34 }
35 }
36
37
38
OLDNEW
« 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