mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-20 12:54:20 +00:00
20 lines
318 B
JavaScript
20 lines
318 B
JavaScript
|
|
var https = require("https"),
|
|
http = require("http");
|
|
|
|
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
|
|
|
|
|
|
|
|
var options = {
|
|
host: "localhost",
|
|
port: 8001,
|
|
path: "/",
|
|
headers: {
|
|
Host: "www.alipay.com"
|
|
}
|
|
};
|
|
https.get(options, function(res) {
|
|
console.log(res);
|
|
res.pipe(process.stdout);
|
|
}); |