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
Hello,
Is there any way, to get HttpRequestMessage and check if it contains a specific header for instance UserAgent?
I would like to cover my code by the test to be sure that the sent UserAgent value is the expected one, currently, I did it by DelegatingHandler, but I'm wondering if there exists a better option since the current one looks ugly to me.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Is there any way, to get HttpRequestMessage and check if it contains a specific header for instance UserAgent?
I would like to cover my code by the test to be sure that the sent UserAgent value is the expected one, currently, I did it by DelegatingHandler, but I'm wondering if there exists a better option since the current one looks ugly to me.
Thank you in advance, for any insights.
Beta Was this translation helpful? Give feedback.
All reactions