anyproxy/test.js

20 lines
318 B
JavaScript
Raw Normal View History

2014-08-14 22:58:30 +08:00
var https = require("https"),
http = require("http");
2014-08-13 11:51:39 +08:00
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
2014-08-14 22:58:30 +08:00
2014-08-13 11:51:39 +08:00
var options = {
2014-08-14 22:58:30 +08:00
host: "localhost",
port: 8001,
path: "/",
headers: {
Host: "www.alipay.com"
}
2014-08-13 11:51:39 +08:00
};
https.get(options, function(res) {
2014-08-14 22:58:30 +08:00
console.log(res);
res.pipe(process.stdout);
2014-08-13 11:51:39 +08:00
});