5
votes

I would like to handle a Server Sent Events stream in Clojure. Does anyone know a small client library to just do that please ?

I was expecting to find something like https://github.com/stalefruits/gniazdo, which is for Websockets, but for SSE.

I could not find anything though and the only lib that may have been a good candidate is not maintained anymore https://github.com/clojurewerkz/ssese

thanks in advance ...

2

2 Answers

0
votes

immutant.web has support for SSE built in: http://immutant.org/documentation/current/apidoc/guide-web.html#h3155

There is also this middleware for other web servers: https://github.com/kumarshantanu/ring-sse-middleware, although I have not tried it myself.