title: How to get the client requested url where the request is coming in the ASP.NET web api?
body: <p>In My application the scenario like i want to read the client requested URL from ASP.NET WEB API.</p>
  
  <p>Example:</p>
  
  <p><a href="https://xxx.test.com/test.html" rel="nofollow">https://xxx.test.com/test.html</a> page is calling <a href="https://api.test.com/api/home/get/1" rel="nofollow">https://api.test.com/api/home/get/1</a> WEB method.</p>
  
  <p>The requested url <a href="https://xxx.test.com/test.html" rel="nofollow">https://xxx.test.com/test.html</a> need to read from the web method.</p>
  
  <p>The below code is returning IP Address. It is not returning domain url.                                                                     </p>
  
  <pre><code>// GET api/home/get/5
  public string Get(int id)
  {
  return HttpContext.Current.Request.UserHostAddress;
  }
  </code></pre>
  
  <p>Please suggest me.</p>
  
  <p>Thanks in Advance.</p>