Files
sdk/pkg/intl/lib/src/http_request_data_reader.dart
T
blois@google.com 1fb79cdb28 Resubmit "Adding ease-of-use methods to HttpRequest."
Fixing the dependent pkg/intl code.

This is the same as my previous CL, but with the modification to pkg/intl/lib/src/http_request_data_reader.dart

BUG=

Review URL: https://codereview.chromium.org//12148002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17949 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 22:40:04 +00:00

24 lines
688 B
Dart

// 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.
/**
* This contains a reader that accesses data using the HttpRequest
* facility, and thus works only in the web browser.
*/
library http_request_data_reader;
import 'dart:async';
import 'dart:html';
import 'intl_helpers.dart';
class HTTPRequestDataReader implements LocaleDataReader {
/** The base url from which we read the data. */
String url;
HTTPRequestDataReader(this.url);
Future read(String locale) => HttpRequest.getString('$url$locale.json');
}