diff --git a/template/ruby-http/index.rb b/template/ruby-http/index.rb index a9c620e..9c96e26 100644 --- a/template/ruby-http/index.rb +++ b/template/ruby-http/index.rb @@ -13,27 +13,23 @@ get '/*' do res, res_headers = handler.run request.body, request.env - headers = res_headers - - return res + [200, res_headers, res] end post '/*' do - res, res_headers = handler.run request.body, request.env - headers = res_headers - return res + res, res_headers = handler.run request.body, request.env + + [200, res_headers, res] end put '/*' do - res, res_headers = handler.run request.body, request.env - headers = res_headers + res, res_headers = handler.run request.body, request.env - return res + [200, res_headers, res] end delete '/*' do - res, res_headers = handler.run request.body, request.env - headers = res_headers + res, res_headers = handler.run request.body, request.env - return res + [200, res_headers, res] end