JSFiddle - React, Tailwind, and code Playground
by andypotanin
HTML
<div id="log"></div>
JavaScript
console.clear();
bash('asd');
function bash() {
var request = jQuery.ajax({
type: "GET",
url: 'https://www.wpcloud.io/wp-admin/admin-ajax.php?action=/application/v1/manifest',
//url: "https://api.wpcloud.io/docker/v1/container/rpc.json",
dataType: 'json',
data: {
name: "John", location: "Boston"
},
headers: {
'x-access-token': 'gpbe-vhqp-ubc-amtsy'
}
});
request.done(function( msg ) {
$( "#log" ).html( msg );
});
request.fail(function( jqXHR, textStatus ) {
console.log( "Request failed: " + textStatus );
});
}