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 /** | 5 /** |
6 * This contains a reader that accesses data using the HttpRequest | 6 * This contains a reader that accesses data using the HttpRequest |
7 * facility, and thus works only in the web browser. | 7 * facility, and thus works only in the web browser. |
8 */ | 8 */ |
9 | 9 |
10 library http_request_data_reader; | 10 library http_request_data_reader; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 completer.completeError(e); | 45 completer.completeError(e); |
46 } | 46 } |
47 }); | 47 }); |
48 | 48 |
49 xhr.onError.listen(completer.completeError); | 49 xhr.onError.listen(completer.completeError); |
50 xhr.send(); | 50 xhr.send(); |
51 | 51 |
52 return completer.future; | 52 return completer.future; |
53 } | 53 } |
54 } | 54 } |
OLD | NEW |