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

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

Issue 9699017: Start better error reporting for sockets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug Created 8 years, 9 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 | « runtime/bin/dartutils.cc ('k') | 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 * the response is ready for processing. The callback is called when 285 * the response is ready for processing. The callback is called when
286 * all headers of the response are received and data is ready to be 286 * all headers of the response are received and data is ready to be
287 * received. 287 * received.
288 */ 288 */
289 void set onResponse(void handler(HttpClientResponse response)); 289 void set onResponse(void handler(HttpClientResponse response));
290 290
291 /** 291 /**
292 * Sets the handler that gets called if an error occurs while 292 * Sets the handler that gets called if an error occurs while
293 * processing the HTTP request. 293 * processing the HTTP request.
294 */ 294 */
295 void set onError(void handler(HttpException e)); 295 void set onError(void handler(HttpException e));
296 } 296 }
297 297
298 298
299 /** 299 /**
300 * HTTP request for a client connection. 300 * HTTP request for a client connection.
301 */ 301 */
302 interface HttpClientRequest default _HttpClientRequest { 302 interface HttpClientRequest default _HttpClientRequest {
303 /** 303 /**
304 * Gets and sets the content length of the request. If the size of 304 * Gets and sets the content length of the request. If the size of
305 * the request is not known in advance set content length to -1, 305 * the request is not known in advance set content length to -1,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 */ 395 */
396 InputStream get inputStream(); 396 InputStream get inputStream();
397 } 397 }
398 398
399 399
400 class HttpException implements Exception { 400 class HttpException implements Exception {
401 const HttpException([String this.message = ""]); 401 const HttpException([String this.message = ""]);
402 String toString() => "HttpException: $message"; 402 String toString() => "HttpException: $message";
403 final String message; 403 final String message;
404 } 404 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698