Is it possible to pass inside the options of the “save” method – a diffrent url/path for the request ?
The default urlRot for the model is –> urlRoot: "/users"
is it possible to do something like that:
this.model.save({
'userName': $('#userName').val(),
'password': $('#password').val()},{
url: "/users/login",
success: function(model, response, options) {
},
So the request, this time, will be sent to “/users/login” and NOT to “/users” ?
From the documentation:
So it looks as if you can provide your own
urlfunction on a model.Example: