2015-09-16 13:21 GMT+03:00 Parthiban, Anandaraaj <[email protected]>:

> get '/method/Entity=:test&ID=:ID' => \&TEST;

You overcomplicate your route-definition. Query string is not a part
of route definition. You need only:

get '/method' => \&TEST;

And when you now query it like:

http://localhost:3000/method?test=xyz&ID=123

It should work fine.


If you really need URLs like

http://localhost:3000/method/test=xyz/ID=123

you can buid your routes with regex, something like that (code not tested):

get qr{/method/name=([\w]+)/ID=([\d]+)} => sub {
    my ($name, $id) = splat;
};

Then you can use all the power of regexes for your URLs.

Wbr,
-- 
Kõike hääd,

Gunnar
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to