evainga / rememberbrall

A tiny little programme which helps to remember interesting stuff.
2 stars 1 forks source link

Missing SSE show case in RememberbrallController #15

Closed mle-enso closed 6 years ago

mle-enso commented 6 years ago

I am pretty sure that we already had a show case of SSE in one of our controllers. This is no longer the case. I would love to see such an endpoint may be similar to this one @GetMapping(path = "/entries", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) but behaving with real SSEs @GetMapping(path = "/entries", produces = MediaType.APPLICATION_STREAM_JSON_VALUE)

evainga commented 6 years ago

You're right, I accidentally added the specification produces = MediaType.APPLICATION_JSON_UTF8_VALUE in the GetMapping of showAllEntries - and just fixed that. But in the code we never really defined the usage of MediaType.APPLICATION_STREAM_JSON_VALUE. As we discovered here clients like a browser couldn't make use of such an endpoint. That's why we only demonstrated the possible usage via curl request:

Does that satisfy your wish for a reactive endpoint, or do you want more?

mle-enso commented 6 years ago

No I am not completely satisfied.

Consider one of the following options:

…or better – implement both :-)

evainga commented 6 years ago

so I hope my solution is now satisfying your request? Then I would like to close the issue.

mle-enso commented 6 years ago

Almost satisfied – with the only remaining question: So what prevents you yet from re-joining these both endpoints? – as also mentioned on the commit comment.

mle-enso commented 6 years ago

Now I see your latest master commit. Well, now I am completely satisfied. :-)