I am writing a route that links the response of several routes, so I need to call other routes from Sinatra. I found this code in Sinatra README for this:
status, headers, body = call env.merge("PATH_INFO" => '/bar')
However, it does not send a query string. So I tried this:
status, headers, body = call env.merge( "PATH_INFO" => '/bar', "QUERY_STRING" => 'param=1' )
This does not work. How can I call another route and pass the query string so that the values ββin the string end with the params hash of the route being called.
We use Sinatra 1.3.1 and Rack 1.3.5.
source share