| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index 0e2dbb5a83a583dff1dfcf0d71270bf919acb17f..ae35cf91d8a063568ed35e5fa83f751a4b33d7bd 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -10573,7 +10573,8 @@ class HttpRequest extends EventTarget native "XMLHttpRequest" {
|
| * See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access_authentication).
|
| */
|
| static Future<HttpRequest> request(String url,
|
| - {String method, bool withCredentials, String responseType, sendData,
|
| + {String method, bool withCredentials, String responseType,
|
| + String mimeType, Map<String, String> requestHeaders, sendData,
|
| void onProgress(ProgressEvent e)}) {
|
| var completer = new Completer<HttpRequest>();
|
|
|
| @@ -10591,6 +10592,16 @@ class HttpRequest extends EventTarget native "XMLHttpRequest" {
|
| xhr.responseType = responseType;
|
| }
|
|
|
| + if (mimeType != null) {
|
| + xhr.overrideMimeType(mimeType);
|
| + }
|
| +
|
| + if (requestHeaders != null) {
|
| + requestHeaders.forEach((header, value) {
|
| + xhr.setRequestHeader(header, value);
|
| + });
|
| + }
|
| +
|
| if (onProgress != null) {
|
| xhr.onProgress.listen(onProgress);
|
| }
|
|
|