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 part of html; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 /** | 7 /** |
8 * A utility for retrieving data from a URL. | 8 * A utility for retrieving data from a URL. |
9 * | 9 * |
10 * HttpRequest can be used to obtain data from http, ftp, and file | 10 * HttpRequest can be used to obtain data from http, ftp, and file |
11 * protocols. | 11 * protocols. |
12 * | 12 * |
13 * For example, suppose we're developing these API docs, and we | 13 * For example, suppose we're developing these API docs, and we |
14 * wish to retrieve the HTML of the top-level page and print it out. | 14 * wish to retrieve the HTML of the top-level page and print it out. |
15 * The easiest way to do that would be: | 15 * The easiest way to do that would be: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 * * If `Access-Control-Expose-Headers` has not been set to true, only a subse
t of all the response headers will be returned when calling [getAllRequestHeader
s]. | 56 * * If `Access-Control-Expose-Headers` has not been set to true, only a subse
t of all the response headers will be returned when calling [getAllRequestHeader
s]. |
57 * | 57 * |
58 * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access
_authentication). | 58 * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access
_authentication). |
59 */ | 59 */ |
60 factory $CLASSNAME.getWithCredentials(String url, | 60 factory $CLASSNAME.getWithCredentials(String url, |
61 onComplete($CLASSNAME request)) => | 61 onComplete($CLASSNAME request)) => |
62 _HttpRequestUtils.get(url, onComplete, true); | 62 _HttpRequestUtils.get(url, onComplete, true); |
63 | 63 |
64 $!MEMBERS | 64 $!MEMBERS |
65 } | 65 } |
OLD | NEW |