-
-
Save herrphon/7d05b0f760440a34a9c7cc105cdf9e05 to your computer and use it in GitHub Desktop.
Try kemal/crystal stream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "kemal" | |
get "/stream" do |env| | |
env.response.print "START" | |
env.response.flush | |
sleep 3 | |
env.response.print "MIDDLE" | |
env.response.flush | |
sleep 5 | |
env.response.print "END" | |
env.response.flush | |
env | |
end | |
Kemal.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment