Added Option to add Interceptors on Client Level#2118
Added Option to add Interceptors on Client Level#2118alexeyzimarev merged 36 commits intorestsharp:devfrom
Conversation
Removed Console.Test which is not inside Repository
…ch to propagate Exceptions to Callers
|
What exactly, do you mean with the Interceptors are called regardless of it they empty or not? If you mean the Interceptor Functions such, you defined ValueTasks, according to Brandon Minnick (https://github.com/brminnick/AsyncAwaitBestPractices) this should be better in performance than using Task self. |
What I mean is that every async/await call is still creating a state machine, and your Basically, the only work left is to align on handling exceptions. My proposal here is that:
I believe it allows to cover your case (set the Alternatively, it is possible to add one more |
|
Sounds like a good way |
|
@alexeyzimarev , public async Task ThrowExceptionIn_InterceptBeforeRequest_ShouldBeCatchableInTest() { EDIT: I think this was due to my question I asked in the follow redirect PR. If after request is called inside the redirection loop then the generated exception gets swallowed by exception -> response translation and throw error on failed request option is off for these tests. |
Description
Added Possibility to add Client wide Interceptors, to check Request and Responses on multiple positions
Purpose
This pull request is a:
Checklist