JSFiddle - React, Tailwind, and code Playground
HTML
<div id="cons">update me</div>
JavaScript
jQuery.ajax({
data: {
"a": "b",
"c": "d"
},
url: "/echo/json/",
dataType: "json",
type: 'GET',
success: function(data, textStatus, jqXHR){
jQuery("#cons").html("updated");
},
error: function(jqXHR, textStatus, errorThrown){
jQuery("#cons").html("error");
}
});