You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the reason is that if just using base.SendAsync inside a task { .. } or async { ... } ce, it will fail to update the parameters and execute it in a different order. I was just assigning it to a binding outside the task and then executing it within the task but that was wrong, it only works if there is no mutation e.g. of request or response.
Shall we add this info to docs website?
The text was updated successfully, but these errors were encountered:
and for sure you need to modify request before you call SendAsync (not matter you use task/async ce or not).
your sample should work like if you change it like this
letloggingHandler={new DelegatingHandler()withmemberx.SendAsync(request,cancellationToken)=task{// your code here, if you change Request it will not change! beware !!!!!return!base.SendAsync(request, cancellationToken)}}
Without having this, I had bugs in my delegating handlers when adding e.g. authorization to query
https://gist.github.com/panesofglass/a1cfc3c9a3f0d41233ad
the reason is that if just using base.SendAsync inside a task { .. } or async { ... } ce, it will fail to update the parameters and execute it in a different order. I was just assigning it to a binding outside the task and then executing it within the task but that was wrong, it only works if there is no mutation e.g. of request or response.
Shall we add this info to docs website?
The text was updated successfully, but these errors were encountered: