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 class _HttpHeaders implements HttpHeaders { | 5 class _HttpHeaders implements HttpHeaders { |
6 _HttpHeaders() : _headers = new Map<String, List<String>>(); | 6 _HttpHeaders() : _headers = new Map<String, List<String>>(); |
7 | 7 |
8 List<String> operator[](String name) { | 8 List<String> operator[](String name) { |
9 name = name.toLowerCase(); | 9 name = name.toLowerCase(); |
10 return _headers[name]; | 10 return _headers[name]; |
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 return _open(method, host, port, path); | 1961 return _open(method, host, port, path); |
1962 } | 1962 } |
1963 | 1963 |
1964 HttpClientConnection _open(String method, | 1964 HttpClientConnection _open(String method, |
1965 String host, | 1965 String host, |
1966 int port, | 1966 int port, |
1967 String path, | 1967 String path, |
1968 [_HttpClientConnection connection]) { | 1968 [_HttpClientConnection connection]) { |
1969 if (_shutdown) throw new HttpException("HttpClient shutdown"); | 1969 if (_shutdown) throw new HttpException("HttpClient shutdown"); |
1970 if (method == null || host == null || port == null || path == null) { | 1970 if (method == null || host == null || port == null || path == null) { |
1971 throw new IllegalArgumentException(null); | 1971 throw new ArgumentError(null); |
1972 } | 1972 } |
1973 return _prepareHttpClientConnection(host, port, method, path, connection); | 1973 return _prepareHttpClientConnection(host, port, method, path, connection); |
1974 } | 1974 } |
1975 | 1975 |
1976 HttpClientConnection openUrl(String method, Uri url) { | 1976 HttpClientConnection openUrl(String method, Uri url) { |
1977 _openUrl(method, url); | 1977 _openUrl(method, url); |
1978 } | 1978 } |
1979 | 1979 |
1980 HttpClientConnection _openUrl(String method, | 1980 HttpClientConnection _openUrl(String method, |
1981 Uri url, | 1981 Uri url, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2179 | 2179 |
2180 | 2180 |
2181 class _RedirectInfo implements RedirectInfo { | 2181 class _RedirectInfo implements RedirectInfo { |
2182 const _RedirectInfo(int this.statusCode, | 2182 const _RedirectInfo(int this.statusCode, |
2183 String this.method, | 2183 String this.method, |
2184 Uri this.location); | 2184 Uri this.location); |
2185 final int statusCode; | 2185 final int statusCode; |
2186 final String method; | 2186 final String method; |
2187 final Uri location; | 2187 final Uri location; |
2188 } | 2188 } |
OLD | NEW |