Method: Async::HTTP::Protocol::HTTP2::Stream#prepare_input

Defined in:
lib/async/http/protocol/http2/stream.rb

#prepare_input(length) ⇒ Input

Prepare the input stream which will be used for incoming data frames.

Returns:

  • (Input)

    the input body.



95
96
97
98
99
100
101
# File 'lib/async/http/protocol/http2/stream.rb', line 95

def prepare_input(length)
	if @input.nil?
		@input = Input.new(self, length)
	else
		raise ArgumentError, "Input body already prepared!"
	end
end