How can I translate this Ajax call from jQuery to vanilla JavaScript?
What needs to be changed in order to convert it to vanilla JavaScript
$.ajax({
type: "DELETE",
url: "/users/delete/" + $(".deleteUser").data('id');
}}
I attempted to rewrite it myself, but encountered an error message in the console stating 'request is not defined'. I am concerned that it may not recognize the id.
request.open("DELETE", "/users/delete/" + this.dataSet('id'));