AngularJS $http.delete somehow redirecting to GET method of REST API?

2.2k views Asked by At

Here is where I am calling the method:

$http.delete(BaseUrl + '/conversations/' + $scope.conversation.id,{headers:reqHeaders}).
        success(function(data,status){
            $scope.wtf = data;
        }).
        error(function(err){
            $scope.wtf = err;
        });

The REST service is built on Express/Node.js. I have another app (built with Backbone) using the service, including this delete method, without a problem.

From the server log it looks like the DELETE request is coming in followed by a GET. It almost looks like the pre flight OPTIONS request is coming in as DELETE and is followed by GET instead. There is obviously something I'm missing but I can't put my finger on it. Anyone have any thoughts?

EDIT: I am encountering this problem with the app running in a webkit.net embedded browser control. The DELETE request works fine in a proper browser.

0

There are 0 answers