title: Calling method using $http Post in AngularJS
body: <p>I am trying to call the method ProcessCriteria in AngularJS below but for some reason I am keep getting error message:</p>
  
  <blockquote>
    <p>VM18010:1 POST <a href="http://example.com/api/TalentPool/ProcessCriteria" rel="nofollow noreferrer">http://example.com/api/TalentPool/ProcessCriteria</a> 404
    (Not Found)</p>
  </blockquote>
  
  <p>Below is my Calling code:</p>
  
  <pre><code>    var param = { 'Item': item.Key, 'SolrLabel': SolrLabel };
  
          $http({
              method: 'POST',
              url: '/api/TalentPool/ProcessCriteria',
              data: param
              //headers: {
              //    'Content-Type': 'application/x-www-form-urlencoded'
              //}
          }).then(function (response) {
                  // success
                  console.log('Facet Data Posted');
                  return response;
                                      },
                  function (response) { // optional
                      // failed
                      console.log('facet post error occured!');
                  });
  </code></pre>
  
  <p>And my Server side method:</p>
  
  <pre><code>  [System.Web.Http.HttpPost]
          public IHttpActionResult ProcessCriteria(string Item, string SolrLabel)
          {
  
              var itm = Item;
              var solr = SolrLabel;
  
              return Ok();
          }
  </code></pre>
  
  <p>Any suggestions please?</p>