| OLD | NEW |
| 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 #library("http"); | |
| 6 #import("dart:io"); | |
| 7 #source("http_impl.dart"); | |
| 8 #source("../../runtime/bin/buffer_list.dart"); | |
| 9 #source("../../runtime/bin/stream_util.dart"); | |
| 10 | |
| 11 /** | 5 /** |
| 12 * HTTP status codes. | 6 * HTTP status codes. |
| 13 */ | 7 */ |
| 14 interface HttpStatus { | 8 interface HttpStatus { |
| 15 static final int CONTINUE = 100; | 9 static final int CONTINUE = 100; |
| 16 static final int SWITCHING_PROTOCOLS = 101; | 10 static final int SWITCHING_PROTOCOLS = 101; |
| 17 static final int OK = 200; | 11 static final int OK = 200; |
| 18 static final int CREATED = 201; | 12 static final int CREATED = 201; |
| 19 static final int ACCEPTED = 202; | 13 static final int ACCEPTED = 202; |
| 20 static final int NON_AUTHORITATIVE_INFORMATION = 203; | 14 static final int NON_AUTHORITATIVE_INFORMATION = 203; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 */ | 337 */ |
| 344 InputStream get inputStream(); | 338 InputStream get inputStream(); |
| 345 } | 339 } |
| 346 | 340 |
| 347 | 341 |
| 348 class HttpException implements Exception { | 342 class HttpException implements Exception { |
| 349 const HttpException([String this.message = ""]); | 343 const HttpException([String this.message = ""]); |
| 350 String toString() => "HttpException: $message"; | 344 String toString() => "HttpException: $message"; |
| 351 final String message; | 345 final String message; |
| 352 } | 346 } |
| OLD | NEW |