title: How to call web api Controller method with two parameters using angularjs
body: <p>I am pretty new in angularjs and I've looked around to try to find some posts on this and there are many but none that address my specific question (that I could find).</p>
  
  <p>It is as simple as that, I want to send two parameters through angularjs ($http POST) where my first parameter is a json of class object and second is int. What I tried :</p>
  
  <pre><code>        var url = '../Request/'+ id;
          $http({
              method: 'POST',
              url: url,
              data: Data
          }).success(function (data, status, headers, config) {
              deferred.resolve(data);
          }).error(function (data, status, headers, config) {
              debug.error(data);
              deferred.reject('An error occured while saving the request');
          });
  </code></pre>
  
  <p>In my web api Controller I have :</p>
  
  <pre><code>    [POST("Request/{id}")]
      public bool SaveRequest(Data data, int id)
      {
         ...
         ...   
      }
  </code></pre>
  
  <p>When I send only Data it works for me but when I tried to add Id and Data both it won't work. Please let me know what needs to be done for the same, Thanks.</p>