Closed johnnybigoode-zz closed 3 years ago
Thanks for commiting. I'll have a look next week.
Reviewed and tested!! Thanks for contributing!
May be it will be useful (with spark 2.9.4)
import spark.Spark;
import spark.routematch.RouteMatch;
// somewhere after route definitions
for (RouteMatch route : routes()) {
String method = route.getHttpMethod().toString();
if (method.equals("before") || method.equals("after")) continue;
System.out.printf("--> %-7s %s\n", method.toUpperCase(), route.getMatchUri());
}
output
--> POST /internal/update_notification
--> GET /internal/history
--> GET /internal/history_details
--> GET /ping
I want to implement #1006.
From what I understood, adding a
httpRequest
field toRouteMatch
and exposing agetRoutes
method in theService
andSpark
classes.A few lines were changed to accommodate the new field.
And a new test in
MultipleServicesTest
to check if everything is dandy.