Using XMLHttpRequest:
var xhr = new XMLHttpRequest();
xhr.open('DELETE','http://localhost:8000/da8e1434e155e8a20f328de7d7ea5874d149f5ee', true);
xhr.onload = function(e) {
console.log(this.status);
console.log(this.response);
if (this.status == 201) {
success = true;
}
}
xhr.send();