I would like to interpret, for example a request like this:
GET /my/path?foo=bar
just as if it was actually rewritten to e.g.
GET /?path=/my/path&foo=bar
Now I thought I'll be able to achieve this using following route, and use param('path')
along with param('foo')
and the likes, e.g.:
get '/:path' => sub {
return printf "...so you want %s, thinking that best foo is %s...",
param('path'),
param('foo');
}
but I get 404 -- It seems that the :path
part cannot contain slashes.
Can I achieve this with routes at all? Or I'm looking at the wrong direction (I'm fresh new to Dancer)?