blob: 1d35b61bda056ece875e2975057b8ae5a2a57c4e [file] [log] [blame]
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// 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 $FACTORYPROVIDER {
static HttpRequest createHttpRequest() =>
JS('HttpRequest', 'new XMLHttpRequest();');
static HttpRequest createHttpRequest_get(String url,
onSuccess(HttpRequest request)) =>
_HttpRequestUtils.get(url, onSuccess, false);
static HttpRequest createHttpRequest_getWithCredentials(String url,
onSuccess(HttpRequest request)) =>
_HttpRequestUtils.get(url, onSuccess, true);
}