| 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 $LIBRARYNAME; | 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * port, and application layer protocol) as the URL you are trying to access | 23 * port, and application layer protocol) as the URL you are trying to access |
| 24 * with HttpRequest. However, there are ways to | 24 * with HttpRequest. However, there are ways to |
| 25 * [get around this restriction](http://www.dartlang.org/articles/json-web-servi
ce/#note-on-jsonp). | 25 * [get around this restriction](http://www.dartlang.org/articles/json-web-servi
ce/#note-on-jsonp). |
| 26 * | 26 * |
| 27 * See also: | 27 * See also: |
| 28 * | 28 * |
| 29 * * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-
web-service/#getting-data) | 29 * * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-
web-service/#getting-data) |
| 30 * * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpReq
uest) | 30 * * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpReq
uest) |
| 31 * * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttp
Request/Using_XMLHttpRequest) | 31 * * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttp
Request/Using_XMLHttpRequest) |
| 32 */ | 32 */ |
| 33 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 33 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Creates a URL get request for the specified [url]. | 36 * Creates a URL get request for the specified [url]. |
| 37 * | 37 * |
| 38 * The server response must be a `text/` mime type for this request to | 38 * The server response must be a `text/` mime type for this request to |
| 39 * succeed. | 39 * succeed. |
| 40 * | 40 * |
| 41 * This is similar to [request] but specialized for HTTP GET requests which | 41 * This is similar to [request] but specialized for HTTP GET requests which |
| 42 * return text content. | 42 * return text content. |
| 43 * | 43 * |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 $if DART2JS | 182 $if DART2JS |
| 183 var xhr = new HttpRequest(); | 183 var xhr = new HttpRequest(); |
| 184 return JS('bool', '("overrideMimeType" in #)', xhr); | 184 return JS('bool', '("overrideMimeType" in #)', xhr); |
| 185 $else | 185 $else |
| 186 return true; | 186 return true; |
| 187 $endif | 187 $endif |
| 188 } | 188 } |
| 189 | 189 |
| 190 $!MEMBERS | 190 $!MEMBERS |
| 191 } | 191 } |
| OLD | NEW |