Hi I am need to pass two parameters in the Dancer2 framework but unable to retrieve it from web page.
use Dancer2; use Dancer::Exception; use Plack::Builder; our $VERSION = '0.1'; # Enable JSON Serializer set serializer => 'JSON' get '/login:username:password' => sub { request->params; my %user = (); my $username = params->{username}; my $password = params->{password}; %user = ( user => { Name => $username, Pass => $password } ); return \%user; };
When I try to access it from the webpage http://localhost:5000?username=foo&password=bar I am getting 404 error. Did I messed up the perl code in the above app.pm package.
In reply to Dancer2 Parameter Matching Failed by akuk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |