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, |
689 bool preserveBackslash: false}) { | 690 bool preserveBackslash: false}) { |
690 return _HeaderValue.parse(value, | 691 return _HeaderValue.parse(value, |
691 parameterSeparator: parameterSeparator, | 692 parameterSeparator: parameterSeparator, |
| 693 valueSeparator: valueSeparator, |
692 preserveBackslash: preserveBackslash); | 694 preserveBackslash: preserveBackslash); |
693 } | 695 } |
694 | 696 |
695 /** | 697 /** |
696 * Gets the header value. | 698 * Gets the header value. |
697 */ | 699 */ |
698 String get value; | 700 String get value; |
699 | 701 |
700 /** | 702 /** |
701 * Gets the map of parameters. | 703 * Gets the map of parameters. |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 class RedirectException implements HttpException { | 2014 class RedirectException implements HttpException { |
2013 final String message; | 2015 final String message; |
2014 final List<RedirectInfo> redirects; | 2016 final List<RedirectInfo> redirects; |
2015 | 2017 |
2016 const RedirectException(this.message, this.redirects); | 2018 const RedirectException(this.message, this.redirects); |
2017 | 2019 |
2018 String toString() => "RedirectException: $message"; | 2020 String toString() => "RedirectException: $message"; |
2019 | 2021 |
2020 Uri get uri => redirects.last.location; | 2022 Uri get uri => redirects.last.location; |
2021 } | 2023 } |
OLD | NEW |