From 6759fb23736126b887e10da7471c6ad472364486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20Pa=C5=A1ali=C4=87?= Date: Thu, 25 Feb 2016 16:24:39 +0100 Subject: [PATCH] Add options to the DSL As in https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2 and because it's a nice way to document API --- src/kemal/dsl.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kemal/dsl.cr b/src/kemal/dsl.cr index b9673b2..c18dbeb 100644 --- a/src/kemal/dsl.cr +++ b/src/kemal/dsl.cr @@ -1,4 +1,4 @@ -HTTP_METHODS = %w(get post put patch delete) +HTTP_METHODS = %w(get post put patch delete options) {% for method in HTTP_METHODS %} def {{method.id}}(path, &block : HTTP::Server::Context -> _)