Index: lib/dom/src/_HttpRequestUtils.dart |
=================================================================== |
--- lib/dom/src/_HttpRequestUtils.dart (revision 10782) |
+++ lib/dom/src/_HttpRequestUtils.dart (working copy) |
@@ -2,20 +2,20 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-class _XMLHttpRequestUtils { |
+class _HttpRequestUtils { |
- // Helper for factory XMLHttpRequest.get |
- static XMLHttpRequest get(String url, |
- onSuccess(XMLHttpRequest request), |
+ // Helper for factory HttpRequest.get |
+ static HttpRequest get(String url, |
+ onSuccess(HttpRequest request), |
bool withCredentials) { |
- final request = new XMLHttpRequest(); |
+ final request = new HttpRequest(); |
request.open('GET', url, true); |
request.withCredentials = withCredentials; |
// Status 0 is for local XHR request. |
request.on.readyStateChange.add((e) { |
- if (request.readyState == XMLHttpRequest.DONE && |
+ if (request.readyState == HttpRequest.DONE && |
(request.status == 200 || request.status == 0)) { |
onSuccess(request); |
} |