title: AngularJS construct JSON object for Delete
body: <p>I am trying to construct JSON object to pass to REST API for delete . I am facing issues while calling the REST . I feel that I'm not properly constructing my JSON object . This is my AngularJS Controller Code </p>
  
  <pre><code> var data = ["ABC","DEF"]; 
   var deletedata = [];
   deletedata = {"idList" : data}
   $http.delete('http://localhost:8080/services/delete/'+Systems+"", deletedata);
  </code></pre>
  
  <p>when i call my REST API the above way it fails . But when i call my REST API using ARC with JSON data like this It works</p>
  
  <pre><code> {
   "idList" :["ABC", "DEF"]
  }       
  </code></pre>
  
  <p>while calling via ANgular whether i am creating my JSON object in a wrong way ?The Error i got on REST API is this </p>
  
  <pre><code>org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/octet-stream' not supported
  </code></pre>