Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
refactor(http): remove a now useless workaround
Browse files Browse the repository at this point in the history
dartbug.com/13051 has been fixed.
see https://code.google.com/p/dart/issues/detail?id=13051 for details.

Closes #523
  • Loading branch information
vicb authored and mhevery committed Feb 11, 2014
1 parent a33acc0 commit 06d6f28
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions lib/core_dom/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,11 @@ class HttpBackend {
async.Future request(String url,
{String method, bool withCredentials, String responseType,
String mimeType, Map<String, String> requestHeaders, sendData,
void onProgress(dom.ProgressEvent e)}) {
// Complete inside a then to work-around dartbug.com/13051
var c = new async.Completer();

dom.HttpRequest.request(url,
method: method,
withCredentials: withCredentials,
responseType: responseType,
mimeType: mimeType,
requestHeaders: requestHeaders,
sendData: sendData,
onProgress: onProgress).then((x) => c.complete(x),
onError: (e, stackTrace) => c.completeError(e, stackTrace));
return c.future;
}
void onProgress(dom.ProgressEvent e)}) =>
dom.HttpRequest.request(url, method: method,
withCredentials: withCredentials, responseType: responseType,
mimeType: mimeType, requestHeaders: requestHeaders,
sendData: sendData, onProgress: onProgress);
}

@NgInjectableService()
Expand Down

0 comments on commit 06d6f28

Please sign in to comment.