Sha256: e2ff50b96efde5ecca62f4d2897059a387cd61b0494060d07ef8b8ec3281e985

Contents?: true

Size: 447 Bytes

Versions: 26

Compression:

Stored size: 447 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.run do
	server = Async::HTTP::Server.for(endpoint, protocol) do |request|
		Protocol::HTTP::Response[200, {}, request.body]
	end
	
	server.run
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
async-http-0.48.2 examples/upload/server.rb
async-http-0.48.1 examples/upload/server.rb
async-http-0.48.0 examples/upload/server.rb
async-http-0.47.0 examples/upload/server.rb
async-http-0.46.5 examples/upload/server.rb
async-http-0.46.4 examples/upload/server.rb
async-http-0.46.3 examples/upload/server.rb
async-http-0.46.2 examples/upload/server.rb
async-http-0.46.1 examples/upload/server.rb
async-http-0.46.0 examples/upload/server.rb
async-http-0.45.9 examples/upload/server.rb
async-http-0.45.8 examples/upload/server.rb
async-http-0.45.7 examples/upload/server.rb
async-http-0.45.6 examples/upload/server.rb
async-http-0.45.4 examples/upload/server.rb
async-http-0.45.3 examples/upload/server.rb
async-http-0.45.2 examples/upload/server.rb
async-http-0.45.1 examples/upload/server.rb
async-http-0.45.0 examples/upload/server.rb
async-http-0.44.0 examples/upload/server.rb