How can I extract the scheme, host, path, and query string from the HTTP Referer using C#?
I'm currently working on a simple ASP.NET Core MVC 6 application and getting the HTTP Referer using
if you save the referrer as a string say
refURL = Context.Request.Headers["Referer"].ToString()
var address = new System.Uri(refURL); var scheme = address.Scheme ; var host = address.Host;
details on Uri Class