class Async::HTTP::Protocol::HTTP2::Response
def build_request(headers)
def build_request(headers) request = ::Protocol::HTTP::Request.new request.headers = ::Protocol::HTTP::Headers.new headers.each do |key, value| if key == SCHEME raise ::Protocol::HTTP2::HeaderError, "Request scheme already specified!" if request.scheme request.scheme = value elsif key == AUTHORITY raise ::Protocol::HTTP2::HeaderError, "Request authority already specified!" if request.authority request.authority = value elsif key == METHOD raise ::Protocol::HTTP2::HeaderError, "Request method already specified!" if request.method request.method = value elsif key == PATH raise ::Protocol::HTTP2::HeaderError, "Request path is empty!" if value.empty? raise ::Protocol::HTTP2::HeaderError, "Request path already specified!" if request.path request.path = value elsif key.start_with? ':' raise ::Protocol::HTTP2::HeaderError, "Invalid pseudo-header #{key}!" else request.headers[key] = value end end @request = request end