Test POST to Consumer

See gh-36
This commit is contained in:
Dave Syer
2017-03-28 10:00:53 +01:00
parent 8aefd9b472
commit 0d08735dda
2 changed files with 24 additions and 5 deletions

View File

@@ -64,9 +64,9 @@ public class FunctionController {
Flux<String> result = (Flux<String>) function.apply(body);
return debug ? result.log() : result;
}
Consumer<String> consumer = functions.lookupConsumer(name);
Consumer<Flux<?>> consumer = functions.lookupConsumer(name);
if (consumer != null) {
body.subscribe(consumer::accept);
consumer.accept(body);
return null;
}
throw new IllegalArgumentException("no such function: " + name);