Closed mle-enso closed 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:
curl https://rememberbrall.herokuapp.com/entries -H "Accept: application/json"
vs.curl https://rememberbrall.herokuapp.com/entries -H "Accept: application/stream+json"
Does that satisfy your wish for a reactive endpoint, or do you want more?
No I am not completely satisfied.
Consider one of the following options:
…or better – implement both :-)
so I hope my solution is now satisfying your request? Then I would like to close the issue.
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.
Now I see your latest master commit. Well, now I am completely satisfied. :-)
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)