class Async::HTTP::Protocol::HTTP2::Request
def assign_headers(headers)
def assign_headers(headers) headers.each do |key, value| if key == METHOD raise BadRequest, "Request method already specified" if @method @method = value elsif key == PATH raise BadRequest, "Request path already specified" if @path @path = value elsif key == AUTHORITY raise BadRequest, "Request authority already specified" if @authority @authority = value else @headers[key] = value end end end
def hijack?
def hijack? false end
def initialize(protocol, stream)
def initialize(protocol, stream) super(nil, nil, nil, VERSION, Headers.new, Body::Writable.new) @protocol = protocol @stream = stream end