Use body handler
MODIFY
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/engine/VertxPluginRegistry.java
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/engine/VertxPluginRegistry.java
@@ -86,18 +86,15 @@ public class VertxPluginRegistry extends DefaultPluginRegistry {
});
// Body Handler
- response.handler((Handler<Buffer>) buffer -> {
+ response.bodyHandler((Handler<Buffer>) buffer -> {
try {
Files.write(pluginFile.toPath(), buffer.getBytes(), StandardOpenOption.APPEND,
StandardOpenOption.CREATE, StandardOpenOption.WRITE);
+ handler.handle(AsyncResultImpl.create(pluginFile));
} catch (IOException e) {
handler.handle(AsyncResultImpl.create(e, File.class));
}
});
-
- response.endHandler((Handler<Void>) event -> {
- handler.handle(AsyncResultImpl.create(pluginFile));
- });
});
request.exceptionHandler((Handler<Throwable>) error -> {

Use body handler