Improve param parsing and remove url_params from HTTP::Request

This commit is contained in:
Serdar Dogruyol 2018-06-30 16:49:04 +03:00
parent ad5dc053c4
commit d2ef57a128
8 changed files with 41 additions and 55 deletions

View file

@ -29,17 +29,17 @@ end
add_context_storage_type(TestContextStorageType)
add_context_storage_type(AnotherContextStorageType)
def create_request_and_return_io(handler, request)
def create_request_and_return_io_and_context(handler, request)
io = IO::Memory.new
response = HTTP::Server::Response.new(io)
context = HTTP::Server::Context.new(request, response)
handler.call(context)
response.close
io.rewind
io
{io, context}
end
def create_ws_request_and_return_io(handler, request)
def create_ws_request_and_return_io_and_context(handler, request)
io = IO::Memory.new
response = HTTP::Server::Response.new(io)
context = HTTP::Server::Context.new(request, response)
@ -49,6 +49,7 @@ def create_ws_request_and_return_io(handler, request)
# Raises because the IO::Memory is empty
end
io.rewind
{io, context}
end
def call_request_on_app(request)