Showing
1 changed file
with
5 additions
and
0 deletions
@@ -8,6 +8,7 @@ import '../../response/response.dart'; | @@ -8,6 +8,7 @@ import '../../response/response.dart'; | ||
8 | import '../interface/request_base.dart'; | 8 | import '../interface/request_base.dart'; |
9 | import '../utils/body_decoder.dart'; | 9 | import '../utils/body_decoder.dart'; |
10 | 10 | ||
11 | + | ||
11 | /// A `dart:io` implementation of `HttpRequestBase`. | 12 | /// A `dart:io` implementation of `HttpRequestBase`. |
12 | class HttpRequestImpl extends HttpRequestBase { | 13 | class HttpRequestImpl extends HttpRequestBase { |
13 | io.HttpClient? _httpClient; | 14 | io.HttpClient? _httpClient; |
@@ -57,6 +58,10 @@ class HttpRequestImpl extends HttpRequestBase { | @@ -57,6 +58,10 @@ class HttpRequestImpl extends HttpRequestBase { | ||
57 | }); | 58 | }); |
58 | 59 | ||
59 | final bodyBytes = (response); | 60 | final bodyBytes = (response); |
61 | + | ||
62 | + final interceptionResponse = await request.responseInterceptor?.call(request, T, response); | ||
63 | + if(interceptionResponse != null) return interceptionResponse; | ||
64 | + | ||
60 | final stringBody = await bodyBytesToString(bodyBytes, headers); | 65 | final stringBody = await bodyBytesToString(bodyBytes, headers); |
61 | 66 | ||
62 | final body = bodyDecoded<T>( | 67 | final body = bodyDecoded<T>( |
-
Please register or login to post a comment