title: Not hitting with Web API two different GET methods
body: <p>Implemented webapi routing and having two different route methods for for retrieving values but it is differentiated by supplying parameter type.</p>
  
  <p>Api methods are getting hit for the corresponding action methods if we simply specify "apiurl/api/contact/search/sri" and "apiurl/api/contact/get/2" in direct browser url. </p>
  
  <p>But when comes to communicate with angular to webapi, api is not getting hit. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//angular service
  
  contact.search = function (inputName) {
              return $http({
                  method: 'GET',
                  url: url + 'api/contact/search',
                  //params: { name: inputName }
                  data: { name: inputName }
              });
              //return $http.get(url + 'api/contact/search', name);
          }</code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>//WebAPI
  
          [HttpGet]
          [Route("search/{name:alpha}")]        
          public IHttpActionResult GetContacts([FromBody]string name)
          {
              repository = new ContactRepository();
              if (string.IsNullOrEmpty(name))
              {
                  var message = new HttpResponseMessage(HttpStatusCode.BadRequest)
                  {
                      Content = new StringContent("Search Name can not be empty")
                  };
                  throw new HttpResponseException(message);
              }
              return Ok(repository.GetContact(name));
          }
  
          // GET api/contact/5
          [HttpGet]
          [Route("get/{id:int}")]        
          public IHttpActionResult Get(int id)
          {
              repository = new ContactRepository();
              if (id == 0)
              {
                  var message = new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent("Issue with Passed Id Parameter.") };
                  throw new HttpResponseException(message);
              }
              return Ok(repository.GetContact(id));
          }
  </code></pre>