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

Side by Side Diff: runtime/bin/http.dart

Issue 10386010: Add enumeration of the HTTP headers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * HTTP status codes. 6 * HTTP status codes.
7 */ 7 */
8 interface HttpStatus { 8 interface HttpStatus {
9 static final int CONTINUE = 100; 9 static final int CONTINUE = 100;
10 static final int SWITCHING_PROTOCOLS = 101; 10 static final int SWITCHING_PROTOCOLS = 101;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 /** 264 /**
265 * Remove all values for the specified header name. Some headers 265 * Remove all values for the specified header name. Some headers
266 * have system supplied values and for these the system supplied 266 * have system supplied values and for these the system supplied
267 * values will still be added to the collection of values for the 267 * values will still be added to the collection of values for the
268 * header. 268 * header.
269 */ 269 */
270 void removeAll(String name); 270 void removeAll(String name);
271 271
272 /** 272 /**
273 * Enumerate the headers applying the function [f] to each
274 * header. The header names in passed in [name] will be all lower
Anders Johnsen 2012/05/07 13:21:27 This sounds odd. :)
Søren Gjesse 2012/05/07 13:51:46 The HTTP header names are case insensitive (define
275 * case.
276 */
277 void forEach(void f(String name, List<String> values));
278
279 /**
273 * Gets and sets the date. The value of this property will 280 * Gets and sets the date. The value of this property will
274 * reflect the "Date" header 281 * reflect the "Date" header
275 */ 282 */
276 Date date; 283 Date date;
277 284
278 /** 285 /**
279 * Gets and sets the expiry date. The value of this property will 286 * Gets and sets the expiry date. The value of this property will
280 * reflect the "Expires" header 287 * reflect the "Expires" header
281 */ 288 */
282 Date expires; 289 Date expires;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 Socket get socket(); 590 Socket get socket();
584 List<int> get unparsedData(); 591 List<int> get unparsedData();
585 } 592 }
586 593
587 594
588 class HttpException implements Exception { 595 class HttpException implements Exception {
589 const HttpException([String this.message = ""]); 596 const HttpException([String this.message = ""]);
590 String toString() => "HttpException: $message"; 597 String toString() => "HttpException: $message";
591 final String message; 598 final String message;
592 } 599 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698