Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
@nahi
22 lines (17 sloc) 0.325 kb
$:.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
Jump to Line
Something went wrong with that request. Please try again.