Is there a way to denote a POST parameter as optional in Perl using Mojolicious Lite? For instance, is there a way to make the server not return 404 if param2
is not defined in the request body?
post "/my_post" => \&render(post_callback);
sub post_callback {
my ($mojo) = @_;
my $param1 = $mojo->param("param1");
my $param2 = $mojo->param("param2");
}