Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: lib/dom/src/_XMLHttpRequestUtils.dart

Issue 10823352: Rename XMLHttpRequest to HttpRequest. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 class _XMLHttpRequestUtils {
6
7 // Helper for factory XMLHttpRequest.get
8 static XMLHttpRequest get(String url,
9 onSuccess(XMLHttpRequest request),
10 bool withCredentials) {
11 final request = new XMLHttpRequest();
12 request.open('GET', url, true);
13
14 request.withCredentials = withCredentials;
15
16 // Status 0 is for local XHR request.
17 request.on.readyStateChange.add((e) {
18 if (request.readyState == XMLHttpRequest.DONE &&
19 (request.status == 200 || request.status == 0)) {
20 onSuccess(request);
21 }
22 });
23
24 request.send();
25
26 return request;
27 }
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698