addInterceptors method
dynamic
addInterceptors({
- InterceptorSendCallback? requestInterceptor,
- InterceptorSuccessCallback? responseInterceptor,
- InterceptorErrorCallback? errorInterceptor,
Implementation
addInterceptors({
InterceptorSendCallback? requestInterceptor,
InterceptorSuccessCallback? responseInterceptor,
InterceptorErrorCallback? errorInterceptor,
}) {
httpClient.interceptors.add(InterceptorsWrapper(
onRequest: requestInterceptor,
onResponse: responseInterceptor,
onError: errorInterceptor,
));
}