title: $resource POST request with payload in angular
body: <p>I wanted to send a post request with a payload '{}' as required for the back end . I was using angular's $resource service and was not able to achieve this .  Googling I happened to see that 
  <code>method(param,payload)</code> is the way to do that , but I could not make it work . </p>
  
  <p>Below is my $resource factory</p>
  
  <pre><code>.factory('Dfs',['$resource',function($resource){
  return $resource('http://'+server_ip+'/jax/search/',{},
   {
    query:{method:'POST'}
  })}])
  </code></pre>
  
  <p>and in the controller I am calling</p>
  
  <pre><code>  .controller('DFl', function($scope,Dfs){
  
  var d={};
   Dfs.query(d,function(resp)
   {
     console.log(resp);
   })  })
  </code></pre>
  
  <p>The payload I want to send is </p>
  
  <pre><code>{}
  </code></pre>
  
  <p>please help . </p>