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

Version Path
httpclient-2.5.3.1 sample/stream.rb
httpclient-2.5.3 sample/stream.rb
httpclient-2.5.2 sample/stream.rb
httpclient-2.5.1 sample/stream.rb
scout-5.9.7.2.pre vendor/httpclient/sample/stream.rb
httpclient-2.5.0 sample/stream.rb
scout-5.9.8.pre vendor/httpclient/sample/stream.rb
scout-5.9.7.1 vendor/httpclient/sample/stream.rb
glebtv-httpclient-3.2.8 sample/stream.rb
scout-5.9.7.pre vendor/httpclient/sample/stream.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/httpclient-2.4.0/sample/stream.rb
scout-5.9.5 vendor/httpclient/sample/stream.rb
scout-5.9.4 vendor/httpclient/sample/stream.rb
scout-5.9.4.pre vendor/httpclient/sample/stream.rb
httpclient-2.4.0 sample/stream.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/httpclient-2.3.4.1/sample/stream.rb
scout-5.9.3 vendor/httpclient/sample/stream.rb
glebtv-httpclient-3.2.7 sample/stream.rb
glebtv-httpclient-3.2.6 sample/stream.rb
glebtv-httpclient-3.2.4 sample/stream.rb