Revert "Modiy HTTP::Params.[] to fetch all params"

This reverts commit c0745cc9e2.
This commit is contained in:
sdogruyol 2017-05-08 17:28:21 +03:00
parent 0b4856b741
commit e695a491b7
3 changed files with 98 additions and 88 deletions

View file

@ -1,8 +0,0 @@
module HTTP
struct Params
def [](name)
params = raw_params[name]
params.size == 1 ? params.first : params
end
end
end

View file

@ -1,5 +1,5 @@
class HTTP::Request
property override_method : String?
property override_method
property url_params : Hash(String, String)?
getter param_parser : Kemal::ParamParser?
@ -21,7 +21,7 @@ class HTTP::Request
@param_parser = Kemal::ParamParser.new(self)
params = @param_parser.not_nil!.body
if params.has_key?("_method") && HTTP::Request.override_method_valid?(params["_method"])
@override_method = params["_method"].as(String)
@override_method = params["_method"]
end
end
@override_method