| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 class _HttpIncoming extends Stream<List<int>> { | 7 class _HttpIncoming extends Stream<List<int>> { |
| 8 final int _transferLength; | 8 final int _transferLength; |
| 9 final Completer _dataCompleter = new Completer(); | 9 final Completer _dataCompleter = new Completer(); |
| 10 Stream<List<int>> _stream; | 10 Stream<List<int>> _stream; |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 Future<HttpClientResponse> get response { | 727 Future<HttpClientResponse> get response { |
| 728 if (_response == null) { | 728 if (_response == null) { |
| 729 _response = Future.wait([_responseCompleter.future, super.done]) | 729 _response = Future.wait([_responseCompleter.future, super.done]) |
| 730 .then((list) => list[0]); | 730 .then((list) => list[0]); |
| 731 } | 731 } |
| 732 return _response; | 732 return _response; |
| 733 } | 733 } |
| 734 | 734 |
| 735 Future<HttpClientResponse> get done => response; | 735 Future<HttpClientResponse> get done => response; |
| 736 | 736 |
| 737 Future<HttpClientResponse> pipe(Stream<List<int>> stream) { | 737 Future<HttpClientResponse> consume(Stream<List<int>> stream) { |
| 738 super.pipe(stream); | 738 super.consume(stream); |
| 739 return response; | 739 return response; |
| 740 } | 740 } |
| 741 | 741 |
| 742 Future<HttpClientResponse> close() { | 742 Future<HttpClientResponse> close() { |
| 743 super.close(); | 743 super.close(); |
| 744 return response; | 744 return response; |
| 745 } | 745 } |
| 746 | 746 |
| 747 int get maxRedirects => _maxRedirects; | 747 int get maxRedirects => _maxRedirects; |
| 748 void set maxRedirects(int maxRedirects) { | 748 void set maxRedirects(int maxRedirects) { |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 | 1820 |
| 1821 | 1821 |
| 1822 class _RedirectInfo implements RedirectInfo { | 1822 class _RedirectInfo implements RedirectInfo { |
| 1823 const _RedirectInfo(int this.statusCode, | 1823 const _RedirectInfo(int this.statusCode, |
| 1824 String this.method, | 1824 String this.method, |
| 1825 Uri this.location); | 1825 Uri this.location); |
| 1826 final int statusCode; | 1826 final int statusCode; |
| 1827 final String method; | 1827 final String method; |
| 1828 final Uri location; | 1828 final Uri location; |
| 1829 } | 1829 } |
| OLD | NEW |