Created
April 1, 2013 23:22
-
-
Save kevzettler/5288625 to your computer and use it in GitHub Desktop.
dancer SSE example
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
get '/stream' => sub{ | |
content_type 'text/event-stream'; | |
header 'Cache-Control' => 'no-cache'; | |
header 'Connection' => 'Keep-Alive'; | |
return "data: Hello World \n\n"; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment