Committed by
GitHub
Merge pull request #2815 from wheeOs/patch-3
Update http_request_html.dart
Showing
1 changed file
with
13 additions
and
0 deletions
| @@ -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 |
-
Please register or login to post a comment