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

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

Issue 10232006: Check the state of the HTTP request and response when handling headers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reverted unintentional edit 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') | runtime/bin/http_impl.dart » ('J')
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 * used to register callbacks for asynchronous events on the HTTP 409 * used to register callbacks for asynchronous events on the HTTP
410 * connection. The "Host" header for the request will be set based 410 * connection. The "Host" header for the request will be set based
411 * the host and port specified in [url]. This can be overridden 411 * the host and port specified in [url]. This can be overridden
412 * through the HttpClientRequest interface before the request is 412 * through the HttpClientRequest interface before the request is
413 * sent. NOTE if the host is specified as an IP address this will 413 * sent. NOTE if the host is specified as an IP address this will
414 * still be set in the "Host" header. 414 * still be set in the "Host" header.
415 */ 415 */
416 HttpClientConnection openUrl(String method, Uri url); 416 HttpClientConnection openUrl(String method, Uri url);
417 417
418 /** 418 /**
419 * Opens a HTTP connection using the GET method. See [open] for details. 419 * Opens a HTTP connection using the GET method. See [open] for
420 * details. Using this method to open a HTTP connection will set the
421 * content length to 0.
420 */ 422 */
421 HttpClientConnection get(String host, int port, String path); 423 HttpClientConnection get(String host, int port, String path);
422 424
423 /** 425 /**
424 * Opens a HTTP connection using the GET method. See [openUrl] for details. 426 * Opens a HTTP connection using the GET method. See [openUrl] for
427 * details. Using this method to open a HTTP connection will set the
428 * content length to 0.
425 */ 429 */
426 HttpClientConnection getUrl(Uri url); 430 HttpClientConnection getUrl(Uri url);
427 431
428 /** 432 /**
429 * Opens a HTTP connection using the POST method. See [open] for details. 433 * Opens a HTTP connection using the POST method. See [open] for details.
430 */ 434 */
431 HttpClientConnection post(String host, int port, String path); 435 HttpClientConnection post(String host, int port, String path);
432 436
433 /** 437 /**
434 * Opens a HTTP connection using the POST method. See [openUrl] for details. 438 * Opens a HTTP connection using the POST method. See [openUrl] for details.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 */ 538 */
535 InputStream get inputStream(); 539 InputStream get inputStream();
536 } 540 }
537 541
538 542
539 class HttpException implements Exception { 543 class HttpException implements Exception {
540 const HttpException([String this.message = ""]); 544 const HttpException([String this.message = ""]);
541 String toString() => "HttpException: $message"; 545 String toString() => "HttpException: $message";
542 final String message; 546 final String message;
543 } 547 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | runtime/bin/http_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698