Hello!
I need to read continuously large real-time data. I don't want to send each piece of data with single POST, I want to open a connection and read all events while they happened.
How can I do this with Sinatra? It ried this:
post '/mystream' do
stream(:keep_open) do |input|
input.each_line do |line|
warn "Got: #{line}"
end
end
end
But it didn't work at all.