@@ -215,9 +215,11 @@ public class RequestProcessor {
|
||||
if (Collection.class
|
||||
.isAssignableFrom(this.inspector.getInputType(wrapper.handler()))) {
|
||||
flux = Flux.just(body);
|
||||
} else if (body instanceof Flux) {
|
||||
}
|
||||
else if (body instanceof Flux) {
|
||||
flux = Flux.from((Flux) body);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Iterable<?> iterable = body instanceof Collection ? (Collection<?>) body
|
||||
: (body instanceof Set ? Collections.singleton(body)
|
||||
: Collections.singletonList(body));
|
||||
|
||||
@@ -100,8 +100,7 @@ public class FunctionController {
|
||||
|
||||
@PostMapping(path = "/**", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
||||
@ResponseBody
|
||||
public Mono<ResponseEntity<?>> postStream(ServerWebExchange request,
|
||||
@RequestBody(required = false) Flux<String> body) {
|
||||
public Mono<ResponseEntity<?>> postStream(ServerWebExchange request, @RequestBody(required = false) Flux<String> body) {
|
||||
final FunctionWrapper wrapper = wrapper(request);
|
||||
return this.processor.response(wrapper, body, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user