Create a gist now

Instantly share code, notes, and snippets.

@nrpuig /JavaScript API Secret
Created Nov 18, 2015

What would you like to do?
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