HTTP::Handler is not a class, it's a module
karhatsu opened this issue · 4 comments
karhatsu commented
test.cr:
require "kemal"
require "kemal-csrf"
add_handler CSRF.new
get "/" do
"Hello World!"
end
Kemal.run
> crystal test.cr
Error in test.cr:2: while requiring "kemal-csrf"
require "kemal-csrf"
^
in lib/kemal-csrf/src/kemal-csrf.cr:13: HTTP::Handler is not a class, it's a module
class CSRF < HTTP::Handler
^~~~~~~~~~~~~
What am I doing wrong?
karhatsu commented
I have: Crystal 0.21.0 (2017-02-21)
karhatsu commented
Thanks, master
works well. Looking forward to the new version.