function HTTPGET(url) {
var request = Components.classes['@mozilla.org/xmlextras/xmlhttprequest;1'].createInstance(Components.interfaces.nsIXMLHttpRequest);
async = false;
request.open('GET', url, async);
request.send();
if (request.status !== 200) {
var message = 'an error occurred at url: ' + url + ', status: ' + request.status;
return message;
}
return request.response;
}
HTTPGET('https://www.haiyun.me');
标签:none