title: POST a JSON array with ANGULARJS $resource
body: <p>I need to do send a json array to a restful api from my angularjs application. I am using ngresources to do this.
  Since now, I have been abled to post and put single object with no problem, but now I need to send an array of objects and I can't.</p>
  
  <p>I tried to do the call from a external rest application and it works fine but it's impossible from my angular application. I have trie to parse the objet with JSON.stringify but stills not working. I set the header 'Content-Type': 'application/json', as well on the $resources.</p>
  
  <p>This is how I do the negresource:</p>
  
  <pre><code>.factory('AddSignosClinicos', function ($resource) {
  
      return $resource(dondeapuntar + "/Rest/Pacientedatossignosclinicos.svc/pACIENTEDATOSSIGNOSCLINICOSList/Add", {}, {
          create: { method: "POST", headers: { 'Content-Type': 'application/json', params: {} } }
      });
  })
  </code></pre>
  
  <p>And this is how I call the function:</p>
  
  <pre><code>var objeto = JSON.stringify(SignosClinicosGuardar);
  
  var signosClinicosService = new AddSignosClinicos(objeto);
  
  signosClinicosService.$create().then(function () {});
  </code></pre>
  
  <p>I made a console.log of objeto, and is a proper json array.</p>
  
  <p>Any idea?</p>
  
  <p>Thank you very much</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have tried $http component for the post request, and it worked! I don´t understand why is not working with ngResources, this is my code for $http:</p>
  
  <pre><code>  $http({
              url:    'http://localhost:1046/Rest/Pacientedatossignosclinicos.svc/pACIENTEDATOSSIGNOSCLINICOSList/Add',
              method: "POST",
              data: SignosClinicosGuardar,
              headers: {
                  'Content-Type': 'application/json; charset=UTF-8'
              }
          });
  </code></pre>