This repository has been archived on 2021-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
D3/D3-Annotator/popup/connection_details.js

17 lines
512 B
JavaScript

var xhr = new XMLHttpRequest();
xhr.open("GET", 'http://10.1.100.17:8080/api/status');
//Send the proper header information along with the request
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function(){ // Call a function when the state changes.
if(this.readyState === XMLHttpRequest.DONE && this.status === 200){
console.log("XMLHttpRequest: Ready state.");
}
}
xhr.send();
var meta = xhr.response();
document.getElementById('list').innerHTML = meta;