Your IP : 3.22.217.176


Current Path : /opt/alt/alt-nodejs14/root/lib/node_modules/npm/node_modules.bundled/duplexify/
Upload File :
Current File : //opt/alt/alt-nodejs14/root/lib/node_modules/npm/node_modules.bundled/duplexify/example.js

var duplexify = require('duplexify')
var http = require('http')

var request = function(opts) {
  var req = http.request(opts)
  var dup = duplexify()
  dup.setWritable(req)
  req.on('response', function(res) {
    dup.setReadable(res)
  })
  return dup
}

var req = request({
  method: 'GET',
  host: 'www.google.com',
  port: 80
})

req.end()
req.pipe(process.stdout)

?>