I am hoping someone can help me understand how to get this to work as
a POST instead of GET.
When I do sub below as 'get' it works but when I replace 'get' with
'post' I get:--2015-08-06 13:52:05--
http://0.0.0.0:3000/userConnecting to 0.0.0.0:3000... connected.HTTP
request sent, awaiting response... 404 Not Found2015-08-06 13:52:05
ERROR 404: Not Found.package MyApp;use Dancer ':syntax';use
Dancer::Plugin::FormValidator;our $VERSION = '0.1';post '/user' => sub
{       my $input_hash = {                FName => param('firstname'),
        LName => param('lastname'),       Email => param('email'),
  Terms => param('terms'),   };    my $number_of_defined_values =
scalar grep { defined } values %{$input_hash};
$number_of_defined_values = $number_of_defined_values + 0;   if
($number_of_defined_values > 1) {         my $error =
form_validator_error( 'profile_user', $input_hash );               if
( ! $error ) {            #the user provided complete and validates
data it's cool to proceed                  } else {          my %hash =
%$error;             foreach my $k (keys %hash) {                return "$k:
$hash{$k}\n";                }          }   }   template
'user';##########################################################};
### end of sub user ###################################true;Thanks in
advance for any help.
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to