RosettaCodeData/Task/HTTPS/JavaScript/https.js

7 lines
297 B
JavaScript
Raw Normal View History

2013-10-27 22:24:23 +00:00
(function(url,callback){//on some browsers you can check certificate information.
xhr=new XMLHttpRequest();
xhr.open('GET',url,true);
xhr.onreadystatechange=function(){if(xhr.readyState==xhr.DONE){callback(xhr)}};
xhr.send();
})('https://sourceforge.net',function(xhr){console.log(xhr.response)})