| 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 html; |
| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * port, and application layer protocol) as the URL you are trying to access | 22 * port, and application layer protocol) as the URL you are trying to access |
| 23 * with HttpRequest. However, there are ways to | 23 * with HttpRequest. However, there are ways to |
| 24 * [get around this restriction](http://www.dartlang.org/articles/json-web-servi
ce/#note-on-jsonp). | 24 * [get around this restriction](http://www.dartlang.org/articles/json-web-servi
ce/#note-on-jsonp). |
| 25 * | 25 * |
| 26 * See also: | 26 * See also: |
| 27 * | 27 * |
| 28 * * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-
web-service/#getting-data) | 28 * * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-
web-service/#getting-data) |
| 29 * * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpReq
uest) | 29 * * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpReq
uest) |
| 30 * * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttp
Request/Using_XMLHttpRequest) | 30 * * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttp
Request/Using_XMLHttpRequest) |
| 31 */ | 31 */ |
| 32 /// @domName XMLHttpRequest | 32 @DomName("XMLHttpRequest") |
| 33 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 33 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 34 /** | 34 /** |
| 35 * Creates a URL get request for the specified `url`. | 35 * Creates a URL get request for the specified `url`. |
| 36 * | 36 * |
| 37 * After completing the request, the object will call the user-provided | 37 * After completing the request, the object will call the user-provided |
| 38 * [onComplete] callback. | 38 * [onComplete] callback. |
| 39 */ | 39 */ |
| 40 factory $CLASSNAME.get(String url, onComplete($CLASSNAME request)) => | 40 factory $CLASSNAME.get(String url, onComplete($CLASSNAME request)) => |
| 41 _HttpRequestUtils.get(url, onComplete, false); | 41 _HttpRequestUtils.get(url, onComplete, false); |
| 42 | 42 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 * * 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 * * 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]. |
| 58 * | 58 * |
| 59 * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access
_authentication). | 59 * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access
_authentication). |
| 60 */ | 60 */ |
| 61 factory $CLASSNAME.getWithCredentials(String url, | 61 factory $CLASSNAME.getWithCredentials(String url, |
| 62 onComplete($CLASSNAME request)) => | 62 onComplete($CLASSNAME request)) => |
| 63 _HttpRequestUtils.get(url, onComplete, true); | 63 _HttpRequestUtils.get(url, onComplete, true); |
| 64 | 64 |
| 65 $!MEMBERS | 65 $!MEMBERS |
| 66 } | 66 } |
| OLD | NEW |