8e33fe1a72
This uses the http_parser package instead of dart:io's ContentType, ByteConversionSink instead of ByteBuffer, and a new ClientException type instead of HttpException. This still uses dart:io for the default Client implementation and for [MultipartFile.fromPath]. R=rnystrom@google.com Review URL: https://codereview.chromium.org//216603010 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34716 260f80e4-7a28-3924-810f-c04153c831b5
18 lines
527 B
Dart
18 lines
527 B
Dart
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
library http.exception;
|
|
|
|
/// An exception caused by an error in a pkg/http client.
|
|
class ClientException implements Exception {
|
|
final String message;
|
|
|
|
/// The URL of the HTTP request or response that failed.
|
|
final Uri uri;
|
|
|
|
ClientException(this.message, [this.uri]);
|
|
|
|
String toString() => message;
|
|
}
|