Lessons should use POST

This commit is contained in:
Nanne Baars 2016-09-10 15:32:11 +02:00
parent 2470be7387
commit 4133089d09

View File

@ -27,7 +27,7 @@ define(['jquery',
var options = { var options = {
success:this.reLoadView.bind(this), success:this.reLoadView.bind(this),
url: this.model.urlRoot, url: this.model.urlRoot,
type:'GET' type:'POST'
// $.ajax options can be used here too, for example: // $.ajax options can be used here too, for example:
//timeout: 3000 //timeout: 3000
}; };
@ -46,10 +46,10 @@ define(['jquery',
$(el).click(function(event) { $(el).click(function(event) {
event.preventDefault(); event.preventDefault();
var _url = $(el).attr('link'); var _url = $(el).attr('link');
console.log("About to GET " + _url); console.log("About to POST " + _url);
$.get(_url) $.post(_url)
.done(self.reLoadView.bind(self)) .done(self.reLoadView.bind(self))
.fail(function() { alert("failed to GET " + _url); }); .fail(function() { alert("failed to POST " + _url); });
}); });
}); });
}, },