This is my JavaScript
function that does the POST
function loging() {
$.ajax({
url: "https://192.168.207.203:8443/e_ec_check",
type: "POST",
dataType: "json",
cache: false,
headers: {ContentType: "application/x-www-form-urlencoded"},
body: {username: "admin", password: "admin"},
success: function(response) {
console.log(response);
if (response.auth === 1) {
window.location.href = "https://192.168.207.203:8443/#/app/dashboard";
} else {
$("#invalid").show();
centered($("#invalid"));
$(window).resize(function() {
centered($("#invalid"));
});
setTimeout(function() {
$("#invalid").hide();
}, 3000);
}
}
});
}
<input type="button" value="submit" onclick="loging()" />