Sha256: 8f110284dedf55f39db9789644dac3c5e3942d76a091fa92c05ad4d6cc1be64a

Contents?: true

Size: 443 Bytes

Versions: 28

Compression:

Stored size: 443 Bytes

Contents

$LOAD_PATH.unshift File.expand_path("../../lib", __dir__)

require 'async'
require 'async/http/server'
require 'async/http/endpoint'

protocol = Async::HTTP::Protocol::HTTP2
endpoint = Async::HTTP::Endpoint.parse('http://127.0.0.1:9222', reuse_port: true)

Async.logger.level = Logger::DEBUG

Async do
	server = Async::HTTP::Server.for(endpoint, protocol) do |request|
		Protocol::HTTP::Response[200, {}, request.body]
	end
	
	server.run
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
async-http-0.52.4 examples/upload/server.rb
async-http-0.52.3 examples/upload/server.rb
async-http-0.52.2 examples/upload/server.rb
async-http-0.52.1 examples/upload/server.rb
async-http-0.52.0 examples/upload/server.rb
async-http-0.51.6 examples/upload/server.rb
async-http-0.51.5 examples/upload/server.rb
async-http-0.51.4 examples/upload/server.rb
async-http-0.51.3 examples/upload/server.rb
async-http-0.51.2 examples/upload/server.rb
async-http-0.51.1 examples/upload/server.rb
async-http-0.51.0 examples/upload/server.rb
async-http-0.50.13 examples/upload/server.rb
async-http-0.50.12 examples/upload/server.rb
async-http-0.50.11 examples/upload/server.rb
async-http-0.50.10 examples/upload/server.rb
async-http-0.50.9 examples/upload/server.rb
async-http-0.50.8 examples/upload/server.rb
async-http-0.50.7 examples/upload/server.rb
async-http-0.50.6 examples/upload/server.rb