I am making post request on the server with an id the request looks like this:
app.post('campaign/update/:_id', campaign.update);
the save method is this which calls post request:
this.model.save(null, {success: function(data){
});
}});
and the model is:
var CampaignEditModel = Backbone.Model.extend({
urlRoot:"http://localhost:3033/campaign/update/",
url : function(){
var url = this.urlRoot + this.id;
console.log("in model:"+ this.id ) ;
return url;
},
idAttribute: "_id",
defaults:{
"id":"",
"Name" :""
}
});
the request goes like this:
http://localhost:3033/campaign/update/5c72e198-c8fd-11e2-9cfa-74867a028324
the problem is the console shows the error:
Failed to load resource: the server responded with a status of 404 (Not Found)