aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJaeseung Ha <ipknhama@gmail.com>2015-01-19 19:03:06 +0900
committerJaeseung Ha <ipknhama@gmail.com>2015-01-19 19:03:06 +0900
commit07042b55fdeaab1170cd5ad244939b5ed1f486a9 (patch)
tree232855d6eda941c94dfaeeb9eb2b030038d63b08 /examples
parentb5942c4dda628e1b697a7bddd153e0988b253367 (diff)
downloadcrow-07042b55fdeaab1170cd5ad244939b5ed1f486a9.tar.gz
crow-07042b55fdeaab1170cd5ad244939b5ed1f486a9.zip
fix #27 : handling routes with trailing slash
Diffstat (limited to 'examples')
-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")
([]{