When the user has sent us a single value, we can make the signature
of the handler and the format of the HTTP response much more
natural if it is single valued too (i.e. a Mono).
An HTTP response does not have to be an infinite stream, and in fact
life is simpler if it is not. The timeout in the web wrappers can
be used to close the response and return normally to a client
that has been waiting more than (say) 1s, instead of treating
it as an error condition.
Error handling is still kind of unsolved.
If user sends "Accept: */*" we don't want to default to sending
an SSE (for instance). So the logic for detecting those preferences
has to take MediaType.ALL into account as a special case.
We don't need to cover all the possible uses of Flux (only
Flux<String> really), so this isn't comprehensive coverage of
all the features in Spring WebFlux, but it's good enough for
functions to run with Spring Boot 1.5.
User can POST to web endpoint in SSE style, i.e:
HTTP/1.1
Content-Type: text/event-stream
data:foo
data:bar
Will be converted to a Flux with values foo and bar