radiospiel/sinatra-sse — pull request #2 by jlitola (2012-12-13 21:11:02+00:00)
Title: Added convenience method request.sse? to detect if client requested SSE

This pull request adds sse? convenience method for detecting whether client has requested SSE stream. This allows more readable syntax when creating endpoints that support multiple protocols. E.g.

get '/' do
if request.websocket?
... web socket handling...
elsif request.sse?
... SSE handling ...
else
... chunked data ...
end
end