我有这样的职能:
function getStatusCode(site){
var options = {
host: "127.0.0.1",
port: 8000,
path: site,
headers: {
Host: site
}
};
var status;
http.get(options, function(response) {
status=response.statusCode;
});
return status;
}
只有在http://www.c.o.org/www.un.org/ga/president