-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HttpRequest.GetUri method #3203
Comments
You're looking for GetEncodedUrl or GetDisplayUrl. Out of curiosity what do you need it for? It's not much good outside of logging. |
Thanks, but GetEncodedUrl or GetDisplayUrl return strings not Uri. |
There's a helpful extension method:
Microsoft.ApplicationInsights.AspNetCore.Extensions.HttpRequestExtensions.GetUri
that returns full uri for a given HttpRequest. For some reason these's no such a method in base classes.But the method is in Microsoft.ApplicationInsights.AspNetCore which starting 2.1 isn't included in metapackage anymore. So usage of the method became not very convenient.
It'd be nice to have such a method somewhere in "Microsoft.AspNetCore.App".
The text was updated successfully, but these errors were encountered: