Sha256: f73c21b7b9c85fdaf7b63d86bbd54b0abfeb81dfa91bf8d099455bc17847709f

Contents?: true

Size: 371 Bytes

Versions: 13

Compression:

Stored size: 371 Bytes

Contents

# encoding: UTF-8
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')

require 'streamly'

raise Exception, "You must pass a URL to request" if ARGV[0].nil?
raise Exception, "You must pass a payload to PUT" if ARGV[1].nil?

url = ARGV[0]
payload = ARGV[1]
resp = ''
Streamly.put(url, payload) do |chunk|
  STDOUT.write chunk
  STDOUT.flush
end
puts

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
brianmario-streamly-0.1.1 examples/streaming/put.rb
brianmario-streamly-0.1.2 examples/streaming/put.rb
brianmario-streamly-0.1.3 examples/streaming/put.rb
streamly_ffi-0.2.6 examples/streaming/put.rb
streamly_ffi-0.2.4 examples/streaming/put.rb
streamly_ffi-0.2.3 examples/streaming/put.rb
streamly_ffi-0.2.2 examples/streaming/put.rb
streamly_ffi-0.2.1 examples/streaming/put.rb
streamly_ffi-0.2.0 examples/streaming/put.rb
streamly_ffi-0.1.6 examples/streaming/put.rb
streamly_ffi-0.1.5 examples/streaming/put.rb
streamly-0.1.4 examples/streaming/put.rb
streamly-0.1.3 examples/streaming/put.rb