This Code Snippet is Essential
function makeRequest() {
var dataToSend = {
"username": "234zu",
"subject": "qwertz",
"content": "qw",
"created_at": "2018-12-15 22:18:54",
"updated_at": "2018-12-15 22:18:54"
}
var jsonData = JSON.stringify(dataToSend)
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("response").innerHTML = this.responseText;
}
};
xhr.open("POST", "url", true);
xhr.send("jsonData")
}