Commit Graph

6 Commits

Author SHA1 Message Date
Dave Syer
946f4a3bf3 Fix HTTP responses that caller asked to be JSON
If caller says he accepts application/json we need to be sure that
we send an array. That wasn't quite working and hadn't been tested.
2017-01-20 13:54:23 -05:00
Dave Syer
452106f287 Fix some logic with media types
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.
2017-01-20 13:10:57 +00:00
Dave Syer
216e5c9207 Add MVC body processors to handle Flux
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.
2017-01-12 08:55:46 -05:00
Dave Syer
fc9d258564 Add custom JsonObjectDecoder to extract a Flux<String> from request 2017-01-06 15:21:56 +00:00
Dave Syer
3357a93cef Add some tests for JSON mime types in rest endpoints 2017-01-06 14:11:48 +00:00
Dave Syer
4ad01be090 Add support for server-side events and tests
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
2017-01-06 12:43:38 +00:00