Backbone model.save() is sending PUT instead of POST

前端 未结 3 1394
甜味超标
甜味超标 2020-12-31 00:56

I call save using this:

console.log(this.model.isNew());
console.log(this.model);

this.model.save({}, {
    success: function (model, response, options) {
          


        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 01:33

    You can specify the ID in defaults, just make sure it's set to null (isNew will be set to true).

    In your case it must be

    LineNo_: null
    

提交回复
热议问题