Osman Kutlucan
Committed by GitHub

Update http_request_html.dart

emphasizing that response interception has still to be implemented for web
@@ -53,6 +53,19 @@ class HttpRequestImpl implements IClient { @@ -53,6 +53,19 @@ class HttpRequestImpl implements IClient {
53 reader.onLoad.first.then((_) async { 53 reader.onLoad.first.then((_) async {
54 var bodyBytes = (reader.result as List<int>).toStream(); 54 var bodyBytes = (reader.result as List<int>).toStream();
55 55
  56 + if(request.responseInterceptor != null) throw 'response interception not implemented for web yet!';
  57 +
  58 + /*
  59 + TODO to be implemented like in http_request_io.dart
  60 + final interceptionResponse = await request.responseInterceptor?.call(request, T, reponse);
  61 +
  62 + if (interceptionResponse != null) {
  63 + completer.complete(interceptionResponse);
  64 + return;
  65 + }
  66 +
  67 + */
  68 +
56 final stringBody = 69 final stringBody =
57 await bodyBytesToString(bodyBytes, xhr.responseHeaders); 70 await bodyBytesToString(bodyBytes, xhr.responseHeaders);
58 71