title: Uri.EscapeDataString or HttpUtility.UrlEncode does not work for my case
body: <p>I have an API in a project which I coded as following:</p>
  
  <pre><code>[Route("api/SearchCustomer/{customer}")]
  [HttpGet]
  public List&lt;Customer&gt; SearchCustomer(string customer)
  {
      return customerRepo.GetSearchJoined(customer);
  }
  </code></pre>
  
  <p>At first, I got an issue when I am calling this API from my front end, if customer contains dot or space(for example: <a href="https://www.somesite.com/walmart" rel="nofollow noreferrer">https://www.somesite.com/walmart</a> Inc.), I will get 404 error(cannot found this API). I find an easy way to solve this problem. Just add a "/" will solve this problem.(<a href="https://www.somesite.com/walmart" rel="nofollow noreferrer">https://www.somesite.com/walmart</a> Inc./ )</p>
  
  <p>Now I need to call this API in another project at the back end. So I did something like this:</p>
  
  <pre><code>var urlParm = "https://www.somesite.com/api/SearchCustomer/" + name + "/";
  response = client.GetAsync(urlParm).Result;
  var dataObjects = response.IsSuccessStatusCode ? response.Content.ReadAsAsync&lt;IList&lt;Customer&gt;&gt;().Result : null;
  return dataObjects;
  </code></pre>
  
  <p>Unfortunately, adding the "/" at back does not work. I am still getting 404 error. Then, I tried to use Uri.EscapeDataString or HttpUtility.UrlEncode to encode "name".(<a href="https://stackoverflow.com/questions/86477/does-c-sharp-have-an-equivalent-to-javascripts-encodeuricomponent">Does C# have an equivalent to JavaScript&#39;s encodeURIComponent()?</a>)</p>
  
  <pre><code>name = Uri.EscapeDataString(name)
  or name = HttpUtility.UrlEncode(name)
  or name = HttpUtility.UrlPathEncode(name)
  var urlParm = "https://www.somesite.com/api/SearchCustomer/" + name + "/";
  or var urlParm = = "https://www.somesite.com/api/SearchCustomer/" + name
  response = client.GetAsync(urlParm).Result;
  var dataObjects = response.IsSuccessStatusCode ? response.Content.ReadAsAsync&lt;IList&lt;Customer&gt;&gt;().Result : null;
  return dataObjects;
  </code></pre>
  
  <p>I have tried all the different matches of above code. All of them did not work. I am still getting the 404 error. Does anyone know what I am doing wrong here?</p>
  
  <p>Sorry for the typo, I removed some sensitive information so I deleted the "api" by mistake. The route is not the problem. I have tested that the api call from the back end worksif name contains only letters or numbers but fails when name contains dot. </p>