This commit is contained in:
Abdullah Alhusaini 2024-07-23 04:05:09 +03:00
parent 5554d3d2f1
commit f6075d37a3

View file

@ -14,8 +14,12 @@ class HTTP::Server
end
def params
if ws_route_found?
@params ||= Kemal::ParamParser.new(@request, ws_route_lookup.params)
else
@params ||= Kemal::ParamParser.new(@request, route_lookup.params)
end
end
def redirect(url : String | URI, status_code : Int32 = 302, *, body : String? = nil, close : Bool = true)
@response.headers.add "Location", url.to_s