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 /** | 7 /** |
8 * HTTP status codes. | 8 * HTTP status codes. |
9 */ | 9 */ |
10 abstract class HttpStatus { | 10 abstract class HttpStatus { |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 factory HeaderValue([String value = "", Map<String, String> parameters]) { | 679 factory HeaderValue([String value = "", Map<String, String> parameters]) { |
680 return new _HeaderValue(value, parameters); | 680 return new _HeaderValue(value, parameters); |
681 } | 681 } |
682 | 682 |
683 /** | 683 /** |
684 * Creates a new header value object from parsing a header value | 684 * Creates a new header value object from parsing a header value |
685 * string with both value and optional parameters. | 685 * string with both value and optional parameters. |
686 */ | 686 */ |
687 static HeaderValue parse(String value, | 687 static HeaderValue parse(String value, |
688 {String parameterSeparator: ";", | 688 {String parameterSeparator: ";", |
689 String valueSeparator: null, | |
690 bool preserveBackslash: false}) { | 689 bool preserveBackslash: false}) { |
691 return _HeaderValue.parse(value, | 690 return _HeaderValue.parse(value, |
692 parameterSeparator: parameterSeparator, | 691 parameterSeparator: parameterSeparator, |
693 valueSeparator: valueSeparator, | |
694 preserveBackslash: preserveBackslash); | 692 preserveBackslash: preserveBackslash); |
695 } | 693 } |
696 | 694 |
697 /** | 695 /** |
698 * Gets the header value. | 696 * Gets the header value. |
699 */ | 697 */ |
700 String get value; | 698 String get value; |
701 | 699 |
702 /** | 700 /** |
703 * Gets the map of parameters. | 701 * Gets the map of parameters. |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 class RedirectException implements HttpException { | 2012 class RedirectException implements HttpException { |
2015 final String message; | 2013 final String message; |
2016 final List<RedirectInfo> redirects; | 2014 final List<RedirectInfo> redirects; |
2017 | 2015 |
2018 const RedirectException(this.message, this.redirects); | 2016 const RedirectException(this.message, this.redirects); |
2019 | 2017 |
2020 String toString() => "RedirectException: $message"; | 2018 String toString() => "RedirectException: $message"; |
2021 | 2019 |
2022 Uri get uri => redirects.last.location; | 2020 Uri get uri => redirects.last.location; |
2023 } | 2021 } |
OLD | NEW |