max/csrf-test/index.html
FinnStutzenstein 9d018e00be initial commit
2020-04-13 08:31:44 +02:00

26 lines
733 B
HTML

<html>
<head>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
</head>
<body>
<h1>Hi</h1>
<script>
function test() {
$.post("http://localhost:8000/user/1/toggle-enabled", null, function () {
console.log("success", arguments);
});
}
</script>
<button onclick="test()">Change</button>
<form action="http://localhost:8000/user/1/toggle-enabled" method="post">
<button type="submit">Submit</button>
</form>
</body>
</html>