Jonny Borges
Committed by GitHub

Merge pull request #2815 from wheeOs/patch-3

Update http_request_html.dart
... ... @@ -53,6 +53,19 @@ class HttpRequestImpl implements IClient {
reader.onLoad.first.then((_) async {
var bodyBytes = (reader.result as List<int>).toStream();
if(request.responseInterceptor != null) throw 'response interception not implemented for web yet!';
/*
TODO to be implemented like in http_request_io.dart
final interceptionResponse = await request.responseInterceptor?.call(request, T, reponse);
if (interceptionResponse != null) {
completer.complete(interceptionResponse);
return;
}
*/
final stringBody =
await bodyBytesToString(bodyBytes, xhr.responseHeaders);
... ...