Sha256: 6274a24facdcc1b0b84dd924c8974d3b4104afdf6cfbb1124dc16bc876427873
Contents?: true
Size: 325 Bytes
Versions: 154
Compression:
Stored size: 325 Bytes
Contents
$:.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
Version data entries
154 entries across 146 versions & 13 rubygems