Skip to content

Instantly share code, notes, and snippets.

@nrpuig
Created November 18, 2015 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrpuig/a8a14f691100ec99b192 to your computer and use it in GitHub Desktop.
Save nrpuig/a8a14f691100ec99b192 to your computer and use it in GitHub Desktop.
function reqListener () {
var data = JSON.parse(this.responseText);
console.log(data['result']);
}
function mnApiCall(equation) {
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "http://tyson.rci.sc.edu/metanumber/api/v1.0/engine/" + equation.replace('/','|'));
oReq.send();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment