Defining a route [1] like
context = HttpServer.create(8556)
.newRouter(r -> r
.get("/hawkular/alerts", (req, resp) -> {
return resp.sendString(Mono.just("Get alerts"));
})
.route(req -> true, (req, resp) -> {
QueryStringDecoder query = new QueryStringDecoder(req.uri());
System.out.printf("route: %s %s\n", query.path(), query.parameters());
return resp.send();
})
).block();
get should accept query parameters in some way.
For example, a call like
curl http://localhost:8556/hawkular/alerts?query=AA
should be handled by the "get" route and not the second "route" one, as there is match in the path.
[1] https://github.com/reactor/reactor-netty/blob/master/src/main/java/reactor/ipc/netty/http/server/HttpServerRoutes.java#L174
P.S.: Testing this on 3.0.5.RELEASE version
Defining a route [1] like
get should accept query parameters in some way.
For example, a call like
should be handled by the "get" route and not the second "route" one, as there is match in the path.
[1] https://github.com/reactor/reactor-netty/blob/master/src/main/java/reactor/ipc/netty/http/server/HttpServerRoutes.java#L174
P.S.: Testing this on 3.0.5.RELEASE version