Personally, I use :
new Uri(request.GetDisplayUrl())
GetDisplayUrl
fully un-escaped form (except for the QueryString)GetEncodedUrl
– fully escaped form suitable for use in HTTP headers
These are extension method from the following namespace : Microsoft.AspNetCore.Http.Extensions