class Protocol::HTTP::Request

def on_interim_response(&block)

@parameter headers [Hash] The headers, e.g. `{"link" => "; rel=stylesheet"}`, etc.
@parameter status [Integer] The HTTP status code, e.g. `100`, `101`, etc.
@yields {|status, headers| ...} The callback to be called when an interim response is received.

Register a callback to be called when an interim response is received.
def on_interim_response(&block)
	if interim_response = @interim_response
		@interim_response = ->(status, headers) do
			block.call(status, headers)
			interim_response.call(status, headers)
		end
	else
		@interim_response = block
	end
end