From 4133089d097990cad6af2a6ed2ba88cdfbf8b24d Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Sat, 10 Sep 2016 15:32:11 +0200 Subject: [PATCH] Lessons should use POST --- .../src/main/webapp/js/goatApp/view/LessonContentView.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js b/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js index d51bf5946..c6a997b9c 100644 --- a/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js +++ b/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js @@ -27,7 +27,7 @@ define(['jquery', var options = { success:this.reLoadView.bind(this), url: this.model.urlRoot, - type:'GET' + type:'POST' // $.ajax options can be used here too, for example: //timeout: 3000 }; @@ -46,10 +46,10 @@ define(['jquery', $(el).click(function(event) { event.preventDefault(); var _url = $(el).attr('link'); - console.log("About to GET " + _url); - $.get(_url) + console.log("About to POST " + _url); + $.post(_url) .done(self.reLoadView.bind(self)) - .fail(function() { alert("failed to GET " + _url); }); + .fail(function() { alert("failed to POST " + _url); }); }); }); },