rest
rest copied to clipboard
Add a Java 9 Flow publisher as Reactive Client response body
Currently, the Java 8 CompletionStage
is the standard Rx client provided in Jersey. As part of Java 9 Flow, a Flow based Publisher based implementation should be provided in all providers.
WebTarget target = ClientBuilder.newClient().target("http://localhost:8080/jaxrs-async");
CompletionStage<Void> future = target.request()
.rx(FlowPublisher.class)
.get(String.class)
.subscribe(t -> System.out.println(t));
Do you like to file a PR containing all needed changes to API, spec, tests and TCK? That would be terrific! :-)