title: Angular $http.delete returns error 422 (Unprocessable Entity)
body: <p>I am getting this frontend issue when my webpage tries to call a DELETE-rest method. But, the fun part is the backend works perfectly when I do the SAME call but using SoapUI.
  Here's my function call:</p>
  
  <pre><code>$scope.remove = function (id) {
       var delUrl = "http://localhost:8080/secure/regulations/" + id;
       $http.delete(delUrl);
  }
  </code></pre>
  
  <p>The web service is like <em>secure/regulations/{id}</em>, and give no answer (just do a delete), and as I said, a SoapUI call works like a charm, but a this function in the browser doesn't. Here below the headers:</p>
  
  <pre><code>General
  Remote Address:127.0.0.1:8080
  Request URL:http://localhost:8080/secure/regulations/4
  Request Method:DELETE
  Status Code:422 Unprocessable Entity
  
  Response Headers
  Content-Type:application/json;charset=UTF-8
  Date:Tue, 23 Jun 2015 14:28:00 GMT
  Server:Apache-Coyote/1.1
  Transfer-Encoding:chunked
  
  Request Headers
  Accept:application/json, text/plain, *\/*
  Accept-Encoding:gzip, deflate, sdch
  Accept-Language:en-US,en;q=0.8
  Connection:keep-alive
  Cookie:__ngDebug=true
  Host:localhost:8080
  Origin:http://localhost:8080
  Referer:http://localhost:8080/secure/
  </code></pre>
  
  <p>Taking a deep look in the backend's function, the problem raises when it does a <em>get(id)</em> against the database (before that point, <em>id</em> has value), but I resist to believe that the problem is there if SoapUI works.
  Something may be missed at frontend code :S</p>
  
  <p><strong>EDIT</strong>:
  In SoapUI, request <em>raw</em> is the following:</p>
  
  <pre><code>DELETE http://localhost:8080/secure/regulations/5 HTTP/1.1
  Accept-Encoding: gzip,deflate
  Content-Type: application/json
  Content-Length: 0
  Host: localhost:8080
  Connection: Keep-Alive
  User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
  </code></pre>
  
  <p>There is no headers at all (in <em>headers</em> tab), but in <em>Representations</em> there is an empty <strong>Media-Type: application/json</strong> (autocreated).</p>
  
  <p>Any help is honestly grateful!</p>