Personally, I use :
new Uri(request.GetDisplayUrl())
GetDisplayUrlfully 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