Sha256: fe4919a8d7878ecdf5e870406df3e0a57c2111396842f36bd9a640223227aad5

Contents?: true

Size: 525 Bytes

Versions: 24

Compression:

Stored size: 525 Bytes

Contents

#!/usr/bin/env ruby

require 'async'
require 'async/http/endpoint'
require 'async/http/client'

Async do
	endpoint = Async::HTTP::Endpoint.parse("https://localhost:9292")
	client = Async::HTTP::Client.new(endpoint, Async::HTTP::Protocol::HTTP2::WithPush)
	
	response = client.get("/index.html")
	
	puts response.status
	puts response.read
	puts
	
	while promise = response.promises.dequeue
		promise.wait
		
		puts "** Promise: #{promise.request.path} **"
		puts promise.read
		puts
	end
ensure
	client.close
end

puts "Done"

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
falcon-0.35.2 examples/push/client.rb
falcon-0.35.1 examples/push/client.rb
falcon-0.35.0 examples/push/client.rb
falcon-0.34.5 examples/push/client.rb
falcon-0.34.4 examples/push/client.rb
falcon-0.34.3 examples/push/client.rb
falcon-0.34.2 examples/push/client.rb
falcon-0.34.1 examples/push/client.rb
falcon-0.34.0 examples/push/client.rb
falcon-0.33.11 examples/push/client.rb
falcon-0.33.10 examples/push/client.rb
falcon-0.33.9 examples/push/client.rb
falcon-0.33.8 examples/push/client.rb
falcon-0.33.7 examples/push/client.rb
falcon-0.33.6 examples/push/client.rb
falcon-0.33.5 examples/push/client.rb
falcon-0.33.4 examples/push/client.rb
falcon-0.33.3 examples/push/client.rb
falcon-0.33.2 examples/push/client.rb
falcon-0.33.1 examples/push/client.rb