http_interceptor
http_interceptor copied to clipboard
A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.
Currently, my interceptResponse looks like: ``` @override Future interceptResponse({required ResponseData data}) async { if (kDebugMode) { print("-- RESPONSE --"); print(data.body); } RequestExceptionCatcher.checkRequestResponse( data.statusCode, ); data.body = utf8.decode(data.bodyBytes); return data; }...
**Describe the bug** We keep having random exceptions: ``` [ERROR] 15:27:26 Failed to fetch calling rates, msg: HandshakeException: Handshake error in client (OS Error: WRONG_VERSION_NUMBER(tls_record.cc:242)) ``` And it is impossible...
When i use a logging interceptor on a multipart request it returns StreamedResponse and if i listen to this object i get "Bad state exception stream has already been listened...
**Describe the bug** I wonder how to test http client with intercepor. I get every time `TimeoutException after 0:00:15.000000: Future not completed` or `Przekroczono limit czasu semafora.` if I remove...
**Describe the bug** Because `_retryCount` is not local var to `_attemptRequest`, it's possible to create infinite loops since a new request restarts the _retryCount to 0 for all pending requests....
# Known Issues in http_interceptor This document outlines the remaining issues found in the codebase that should be addressed for improved robustness and reliability. ## 🔧 Issues by Priority ###...
This pull request introduces significant updates to the `copyWith` methods for `BaseRequest`, `StreamedRequest`, and related classes, transitioning them to asynchronous operations. It also adds comprehensive test coverage for these changes,...
### **GitHub Issue: Generic ClientException on 401/403 Prevents Effective Retry Logic** When using `http_interceptor` with a custom `RetryPolicy`, the retry logic does not work correctly for 401 and 403 HTTP...