aboutsummaryrefslogtreecommitdiffstats
path: root/examples/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example.cpp')
-rw-r--r--examples/example.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/example.cpp b/examples/example.cpp
index fd0d0b5..87518fb 100644
--- a/examples/example.cpp
+++ b/examples/example.cpp
@@ -56,6 +56,12 @@ int main()
return "About Crow example.";
});
+ // a request to /path should be forwarded to /path/
+ CROW_ROUTE(app, "/path/")
+ ([](){
+ return "Trailing slash test case..";
+ });
+
// simple json response
CROW_ROUTE(app, "/json")
([]{