class Async::HTTP::Body::Stream

def read_partial(size = nil)

Read at most `size` bytes from the stream. Will avoid reading from the underlying stream if possible.
def read_partial(size = nil)
	if @buffer
		buffer = @buffer
		@buffer = nil
	else
		buffer = read_next
	end
	
	if buffer and size
		if buffer.bytesize > size
			@buffer = buffer.byteslice(size, buffer.bytesize)
			buffer = buffer.byteslice(0, size)
		end
	end
	
	return buffer
end