骨干销毁方法触发后调用,而不是删除时,键入:“删除”,不通过(Backbone destroy me

2019-09-30 21:09发布

     var asset = Backbone.Model.extend({
                      urlRoot: 'https://www.example.com/asset/',
                      idAttribute: "assetId",
                 });

     var k = new asset({"assetId":11174355100070});


     k.destroy({
                 headers : { 
                            'Authorization': 'OAuth ' + oauthInfo.oa2,
                            'GSID' : oauthInfo.GSID
                 },
                 contentType: "application/json",
                 success: function(){console.log("success method")},
                 error: function(){console.log("failure error")}
      });

为什么骨干destroy方法触发后调用,而不是删除?

但是,当type: "DELETE"获得通过,在工作? 我错过了什么? 为什么一个要经过类型尤其是删除操作时破坏。

文章来源: Backbone destroy method is triggering post call instead of delete when type: “DELETE”, is not passed