Last active
February 1, 2019 13:16
-
-
Save faustinoaq/102f7adfb23265cdb21cf371f60a8c11 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