ampersand-rest-collection
ampersand-rest-collection copied to clipboard
Make type to POST
Where to deifn method, type, etc in the Collection. Need to know how to use success too.
var Collection = AmpersandRestCollection.extend({
url:'http://localhost:3000/users',
model: SignupModel,
type: "POST",
method: "POST",
ajaxConfig: function () {
return {
headers: {
'Content-Type': 'application/json; charset=UTF-8',
'Accept':'text/html'
},
xhrFields: {
withCredentials: false
}
};
}
});