Skip to content Skip to sidebar Skip to footer

Backbone Doing POST Request Instead Of PUT Request

I am trying to set a model's attribute to be something different. When I save the model, Backbone issues a POST request instead of a PUT request. I read on another Stackoverflow po

Solution 1:

How did you create the model in the first place? The model's id needs to be specified in the model's data. Usually this would be returned in the server response the first time you save a new object. Once the id is set Backbone will save it with PUT instead of POST.


Post a Comment for "Backbone Doing POST Request Instead Of PUT Request"