Added request body parsing

This commit is contained in:
Sdogruyol 2015-10-26 20:22:31 +02:00
parent 8a0f9dffff
commit efe75196f7
2 changed files with 19 additions and 0 deletions

View file

@ -29,6 +29,12 @@ class Kemal::Handler < HTTP::Handler
params[key] ||= value
end
if body = request.body
HTTP::Params.parse(request.body.not_nil!) do |key, value|
params[key] ||= value
end
end
kemal_request = Request.new(request, params)
context = Context.new(kemal_request)
begin