title: 400 Bad Request only using AngularJs, works with jQuery
body: <p>I am having troubles using <code>AngularJs</code> for a specific "PUT" Ajax request (RESTFul service).</p>
  
  <p>The same piece of code works with <code>jQuery</code> and plain JavaScript.</p>
  
  <pre><code>$http({
      method: "PUT",
      url: "https://XXXXXXXXXXXXXX/api.php?rquest=updateUuid",
      headers: {
          "Content-type": "text/plain",
          Authorization: "Basic " + btoa(email + ":" + password)
      },
      data: {
          Email: email,
          Uuid: login_response.uuid
      }
  }).success(function(response) {
      console.log(response);
  });
  
  
  jQuery.ajax({
      method: "PUT",
      url: "https://XXXXXXXXXXXXXX/api.php?rquest=updateUuid",
      headers: {
          "Content-type": "text/plain",
          Authorization: "Basic " + btoa(email + ":" + password)
      },
      data: {
          Email: email,
          Uuid: login_response.uuid
      }
  }).done(function(response){
      console.log(response)
  });
  </code></pre>
  
  <p>The server is responding with a <code>JSON</code> object, but the first code (<code>AngularJs</code>) seems to work a bit differently.
  Before I wasn't setting the Content-Type header and I was getting a CORS issue (worked with <code>jQuery</code>, but <code>AngularJs</code> was setting the content-type to "application/json" and was causing an error).</p>
  
  <p>I got the first part fixed setting the content-type to text/plain, but now I'm getting a <code>400 Bad Request Error</code> (only with <code>AngularJs</code>). I also tried to delete the transformRequest using an interceptor, but it didn't work.</p>
  
  <p>Am I using <code>AngularJs</code> wrong? Because I'm thinking that, unlinke <code>jQuery</code>, it is doing extra "stuff" in the background, making some extra headers or not passing the data correctly.</p>
  
  <p>Usually I get that error when I do not pass any data to the RESTful service.</p>
  
  <p>I am learning <code>AngularJs</code>, so I'd rather use it instead of <code>jQuery</code>.
  Any help would be much appreciated.</p>
  
  <p>Thanks a lot</p>