1 2 3 4 5 6 7 8 9 10 11 12 13 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