title: How to get current URL in NET Core 2.0
body: <p>How to get current URL?
  I try that:</p>
  
  <p><em>Program.cs</em></p>
  
  <pre><code>var location = new Uri($"{Request.Scheme}://{Request.Host}{Request.Path}{Request.QueryString}");
  </code></pre>
  
  <p>or</p>
  
  <pre><code>public string BuildAbsolute(PathString path, QueryString query = default(QueryString), FragmentString fragment = default(FragmentString))
      {
          var rq = HttpContent.Request;
          return Microsoft.AspNetCore.Http.Extensions.UriHelper.BuildAbsolute(rq.Scheme, rq.Host, rq.PathBase, path, query, fragment);
      }
  </code></pre>
  
  <p>Visual Studio does not find "Request"</p>
  
  <p>The only thing I need is to take the current URL and Host / Path</p>