You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2019/02/25 05:40:24 UTC

[bookkeeper] branch master updated: [BOOKIE-HTTP-SERVER] Fix: broken vertx rest endpoints

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c14476  [BOOKIE-HTTP-SERVER] Fix: broken vertx rest endpoints
9c14476 is described below

commit 9c14476422ee865769152917405607bd330046fa
Author: Rajan Dhabalia <rd...@apache.org>
AuthorDate: Sun Feb 24 21:40:19 2019 -0800

    [BOOKIE-HTTP-SERVER] Fix: broken vertx rest endpoints
    
    ### Motivation
    Right now, vertx-http-server is not serving any rest endpoint except get because vertx server doesn't add put/post/delete http-methods into routing rules.
    
    ### Modification
    Add put/post/delete http-methods into routing rules.
    
    Reviewers: Sijie Guo <si...@apache.org>
    
    This closes #1953 from rdhabalia/http_ep
---
 .../main/java/org/apache/bookkeeper/http/vertx/VertxHttpServer.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bookkeeper-http/vertx-http-server/src/main/java/org/apache/bookkeeper/http/vertx/VertxHttpServer.java b/bookkeeper-http/vertx-http-server/src/main/java/org/apache/bookkeeper/http/vertx/VertxHttpServer.java
index 15d1039..6d0bd63 100644
--- a/bookkeeper-http/vertx-http-server/src/main/java/org/apache/bookkeeper/http/vertx/VertxHttpServer.java
+++ b/bookkeeper-http/vertx-http-server/src/main/java/org/apache/bookkeeper/http/vertx/VertxHttpServer.java
@@ -70,6 +70,9 @@ public class VertxHttpServer implements HttpServer {
             @Override
             public void bindHandler(String endpoint, VertxAbstractHandler handler) {
                 router.get(endpoint).handler(handler);
+                router.put(endpoint).handler(handler);
+                router.post(endpoint).handler(handler);
+                router.delete(endpoint).handler(handler);
             }
         };
         requestRouter.bindAll();