When I try to $http.put or $http.delete a OPTIONS request is sent and 
receives a 200 response but the PUT or DELETE request is not sent.

This happens in Firefox and Chrome. Here is an image of the Network tab 
from Firefox http://i.imgur.com/Ol14L10.png

POST works fine.

app.factory('Objects', ['$http', '$cacheFactory', function($http, 
$cacheFactory){

  return {
    getLabs: function(){
      return $http.get(HOST + '/api/v1.0/labs/all', {cache: true});
    },
    getLab: function(labId){
      return $http.get(HOST + '/api/v1.0/labs/' + labId, {cache: true});
    },
    createLab: function(data){
      return $http.post(HOST + '/api/v1.0/labs/', data=data);
    },
    updateLab: function(labId, data){
      return $http.put(HOST + '/api/v1.0/labs/' + labId, data=data);
    },
    deleteLab: function(labId){
      return $http.delete(HOST + '/api/v1.0/labs/' + labId + '/delete');
    },
    clearLabs: function(){
      var cache = $cacheFactory.get('$http');
      cache.remove(HOST + '/api/v1.0/labs/all');
    },
  };}]);


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to