title: Is it possible to post an array with $http.post?
body: <p>I'm trying to save an json array to service in back-end via $http.post but I always get <code>400 Bad Request</code>. I have googled all around and there's not a clear answer to be found.</p>
  
  <p>My questions are follows:<br/>
  1. Is it possible to post json array via $http.post?<br/>
  2. If yes, how it is done?<br/>
  3. If no, what other alternatives there would be to save json array with such aim?</p>
  
  <p>To make this even more clear, I'm going to add some of my codes below which are necessary.</p>
  
  <p><strong>At Front-end</strong></p>
  
  <p><strong>SavingsService</strong></p>
  
  <pre><code>createBatchSavings: function(savingsBatch){
          return $http.post('/finance/savings/create/batchsavings', savingsBatch).success(function(data){
              return data;
          });
      }
  </code></pre>
  
  <p>Above function gets it's savingsBatch parameter properly. savingsBatch is json array.</p>
  
  <p><strong>At Back-end</strong></p>
  
  <p>SavingServiceImpl</p>
  
  <pre><code>@Component
  @Path("/savings")
  @Produces("application/json")
  public class SavingsServiceImpl implements SavingsService {
  
  @Autowired
  FinanceEntityDao financeDao;
  
  @POST
  @Path("/create")
  public FinanceEntity createSaving(FinanceEntity financeEntity) {
      financeEntity.setType(FinanceType.SAVING);
      financeEntity.setDateAdded(new Date());
      return financeDao.save(financeEntity);
  }
  
  @POST
  @Path("/create/batchsavings")
  public List&lt;FinanceEntity&gt; createBatchSavings(List&lt;FinanceEntity&gt; savingsBatch) {
      if(savingsBatch.size() &gt; 0){
          return financeDao.massSave(savingsBatch);
      }
      else {
          throw new NullPointerException("Saving batch was null!");
      }
  }
  }
  </code></pre>
  
  <p>I have also examined the header values. Request headers is having proper values but Response headers content-length is always zero. </p>