aboutsummaryrefslogtreecommitdiff
path: root/src/guff/handlers/test-handler.cr
blob: f373630158788d671cc43b7d28e12d925688540f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require "../handler"

class Guff::Handlers::TestHandler < Guff::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