<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>Mashape Query</title>
<script>
function doIt() {
var output = $.ajax({
url: 'https://enclout-whois.p.mashape.com/show.json/', // The URL to the API. You can get this by clicking on "Show CURL example" from an API profile
type: 'GET POST', // The HTTP Method, can be GET POST PUT DELETE etc
data: {},g-zPXD8rmpHpdd8R6Hzb // Additional parameters here
datatype: 'json',
success: function(data) {
//
//Change data.source to data.something , where something is whichever part of the object you want returned.
//To see the whole object you can output it to your browser console using:
//console.log(data);
document.getElementById("output").innerHTML = data.source;
},
error: function(err) { alert(err); },
beforeSend: function(xhr) {
xhr.setRequestHeader("X-Mashape-Authorization", "KEyVvnBgaUmshNZLSpsJc64DuV0tp1csgh3jsnLylpMJLfQ3M4"); // Enter here your Mashape key
}
});
}
</script>
</head>
<body>
<button onclick="doIt()">Whois</button>
<div id="output">Result:</div>
</body>
</html>