responseInterceptor property

ResponseInterceptor? responseInterceptor
getter/setter pair

Hook into the request lifecycle after the response has been received and before the request is considered "complete" (in other words, before the response is delivered to the caller).

If not null, this function will be called with three arguments: the FinalizedRequest instance, the BaseResponse instance, and a RequestException if the request failed. This function should return a Future<BaseResponse>, allowing the opportunity to modify, augment, or replace the response before considering it "complete".

Implementation

ResponseInterceptor? responseInterceptor;