I have some angular code using $resource.remove that works fine in all browsers in both angular 1.3 and 1.4, and it works in IE 11 with angular 1.3 but not 1.4.
My question is, have I run into a bug in 1.4, or am I doing something incorrect?
The following call the Supervisors REST resource and deletes a Supervisor.
angular.module('testApp', ['ngResource'])
.controller('myController', ['$scope', '$resource', function($scope, $resource) {
var Supervisor = $resource('/api/supervisors/:id',{id: '@id'});
$scope.doDelete = function() {
console.log('delete');
Supervisor.remove({id: 12});
};
}]);
IE 11 with angular 1.3.12 produces this HTTP request (which is successful): (notice the content-length)
Accept: application/json, text/plain, */*
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: localhost:8080
Content-Length: 0
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: JSESSIONID=e76ba4dbd3a9d1d8f3308beff627
IE 11 with angular 1.4.5 produces this HTTP request (which results in HTTP/1.1 400 Bad Request): (now content-length is 9)
Accept: application/json, text/plain, */*
Accept-Language: en-US
Content-Type: text/plain;charset=UTF-8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Connection: Keep-Alive
Content-Length: 9
DNT: 1
Host: localhost:8080
Pragma: no-cache
Cookie: JSESSIONID=e76ba4dbd3a9d1d8f3308beff627
undefined