aboutsummaryrefslogtreecommitdiff
path: root/src/guff/test-handler.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/test-handler.cr')
-rw-r--r--src/guff/test-handler.cr14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/guff/test-handler.cr b/src/guff/test-handler.cr
new file mode 100644
index 0000000..3856400
--- /dev/null
+++ b/src/guff/test-handler.cr
@@ -0,0 +1,14 @@
+require "./handler"
+
+module Guff
+ class TestHandler < Handler
+ def call(context : HTTP::Server::Context)
+ if ((context.request.path || "").match(/^\/test\//))
+ context.response.content_type = "text/html"
+ context.response.puts "test"
+ else
+ call_next(context)
+ end
+ end
+ end
+end