Question: No changes in 2+ years, should we consider moving to okhttp-sse instead?
I'll soon start a SSE project, not sure if I should go with this library that looks dedicated to the problem or pick the experimental project from okhttp main repository https://github.com/square/okhttp/tree/master/okhttp-sse as it has more recent changes (2 months). On this library I see no recent changes and the latest version is not a 1.0 but a 0.9, so I'm not sure about the confidence I can have on this lib to push this in production. Maybe it's stable and used in production for years, then I understand there is no changes required, in such case thanks for your responses.
Also I have a question about the listeners, the mechanism from okhttp-sse seems simpler, is there differences in the SSE protocol (2 RFCs?) or does this library provides advanced retry mechanism hence the more complex API? https://github.com/square/okhttp/blob/master/okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt
Good question, i'm wondering the same. okhttp-sse is clearly not documented enough imo.
I did try oksse, in works flawlessly without code boilerplate, so today, i'd still give oksse a go, but it only takes a good readme on okhttp side to attract attention, users...
I'm working on android, and using retrofit, i don't see yet how retrofit will support this, it's quite a massive rework, but once it does, the choice will be a no brainer.
Ditch this library, its dead and broken.
- it depends on an obsolete version of okhttp,
- it does NOT work with http/2, which is hugely important for SSE,
- you can't POST data to the server for setting up the connection.
All of these problems are non-issues for okhttp-sse.
Yes, the documentation sucks, but fortunately, the unit tests have everything you need to get running.