Index: sdk/lib/html/dartium/html_dartium.dart |
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart |
index e549cb6acde4e335620102c0ab365e8f48665f29..7b67f9a2a851acebfc9c390b0cb840d801c89057 100644 |
--- a/sdk/lib/html/dartium/html_dartium.dart |
+++ b/sdk/lib/html/dartium/html_dartium.dart |
@@ -10983,7 +10983,8 @@ class HttpRequest extends EventTarget { |
* 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>(); |
@@ -11001,6 +11002,16 @@ class HttpRequest extends EventTarget { |
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); |
} |