How to determine client name inside handler middleware instantiated via HttpClientFactory #27018
Unanswered
sandersaares
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For purposes of logging/metrics, I want my HTTP message handler middleware to know which HttpClient registration it is being called from. For example:
Where
UseRequestLoggingMiddleware()
adds some custom middleware I use. In this middleware I want to write log entries that reference the string "foo" provided when the HttpClient was registered.However, I am unable to find any way to lookup the HttpClient name "foo" when in the middleware. How can I accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions