<div dir="ltr">Here is what I get from curl.<br><br>curl <a href="http://0.0.0.0:3000/user">http://0.0.0.0:3000/user</a><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br> "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"><br><html><br><head><br><title>Error 404</title><br><link rel="stylesheet" href="/css/error.css" /><br><meta http-equiv="Content-type" content="text/html; charset=UTF-8" /><br></head><br><body><br><h1>Error 404</h1><br><div id="content"><br><h2>Page Not Found</h2><p>Sorry, this is the void.</p><br></div><br><div id="footer"><br>Powered by <a href="<a href="http://perldancer.org/">http://perldancer.org/</a>">Dancer</a>.<br></div><br></body><br></html><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-07 12:12 GMT-05:00 Andrew Solomon <span dir="ltr"><<a href="mailto:andrew@geekuni.com" target="_blank">andrew@geekuni.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That looks very much like you're only managing to make GET calls. I suggest you use curl at the command-line at the outset, then you can struggle with getting your browser to obey:)<span class="HOEnZb"><font color="#888888"><div><br></div><div>Andrew</div></font></span></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 5:58 PM, Richard Reina <span dir="ltr"><<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry this is my dancer console output:<br><br>>> Dancer 1.3140 server 24745 listening on <a href="http://0.0.0.0:3000" target="_blank">http://0.0.0.0:3000</a><br>>> Dancer::Plugin::FormValidator (1.131620)<br>== Entering the development dance floor ...<br>[24745] core @0.000165> request: GET /user from 127.0.0.1 in /usr/local/share/perl/5.14.2/Dancer/Handler.pm l. 58<br>[24745] core @0.000569> [hit #1]Trying to match 'GET /user' against /^\/$/ (generated from '/') in /usr/local/share/perl/5.14.2/Dancer/Route.pm l. 85<br>[24745] core @0.000757> [hit #1]Trying to match 'GET /user' against /^\/player$/ (generated from '/player') in /usr/local/share/perl/5.14.2/Dancer/Route.pm l. 85<br>[24745] core @0.000932> [hit #1]Trying to match 'GET /user' against /^\/sponsor$/ (generated from '/sponsor') in /usr/local/share/perl/5.14.2/Dancer/Route.pm l. 85<br>[24745] core @0.001113> [hit #1]Trying to match 'GET /user' against /^\/$/ (generated from '/') in /usr/local/share/perl/5.14.2/Dancer/Route.pm l. 85<br>[24745] core @0.001282> [hit #1]Trying to match 'GET /user' against /^\/player$/ (generated from '/player') in /usr/local/share/perl/5.14.2/Dancer/Route.pm l. 85<br>[24745] core @0.001452> [hit #1]Trying to match 'GET /user' against /^\/sponsor$/ (generated from '/sponsor') in /usr/local/share/perl/5.14.2/Dancer/Route.pm l. 85<br>[24745] core @0.001956> [hit #1]response: 304 in /usr/local/share/perl/5.14.2/Dancer/Handler.pm l. 181<br>[24745] core @0.000174> request: GET /css/error.css from 127.0.0.1 in /usr/local/share/perl/5.14.2/Dancer/Handler.pm l. 58<br>[24745] core @0.000710> [hit #2]response: 304 in /usr/local/share/perl/5.14.2/Dancer/Handler.pm l. 181<br><br><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-07 11:58 GMT-05:00 Richard Reina <span dir="ltr"><<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is my dancer console output.<br><br><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-07 11:11 GMT-05:00 Richard Reina <span dir="ltr"><<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>replacing the first few lines with:<br><br><html><br><body><span><br><br><h1>Get in the game.</h1><br><br></span><form action="user" method="POST"><br>First name:<br><br><br></div>I still get Error 404<br><br></div>Interestingly enough when I modify this <a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_submit" target="_blank">http://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_submit</a> to method="POST" it does not work either. <br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-07 10:54 GMT-05:00 John Stoffel <span dir="ltr"><<a href="mailto:john@stoffel.org" target="_blank">john@stoffel.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
And I know there's a helper you can use to fill in the action so that<br>
you don't have to update the URLs when you deploy it elsewhere.... but<br>
I'm at work and not near my notes...<br>
<br>
Ah... here it is. Just do:<br>
<br>
<form action="user"><br>
<br>
And I think you also want to remove the <!DOCTYPE html> as well, since<br>
this template will get embedded into alayout which will take care of<br>
all that stuff.<br>
<br>
John<br>
<br>
<br>
Andrew> I think what you're after is something like this to tell the browser you want to POST:<br>
Andrew> <form action="<a href="http://localhost:3000/user" rel="noreferrer" target="_blank">http://localhost:3000/user</a>" method="POST"><br>
<br>
Andrew> Does that do the trick?<br>
<br>
Andrew> A<br>
<br>
Andrew> On Fri, Aug 7, 2015 at 3:47 PM, Richard Reina <<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>> wrote:<br>
<br>
Andrew> Wait, Does this provide a clue to the error of my ways? This is the template (<a href="http://user.tt" rel="noreferrer" target="_blank">user.tt</a>) that I<br>
Andrew> am using for the form.<br>
<br>
Andrew> <!DOCTYPE html><br>
Andrew> <html><br>
Andrew> <body><br>
<br>
Andrew> <h1>Get in the game.</h1><br>
<br>
Andrew> <form><br>
Andrew> First name:<br><br>
Andrew> <input type="text" name="firstname"><br>
Andrew> <br><br>
Andrew> Last name:<br><br>
Andrew> <input type="text" name="lastname"><br>
Andrew> <br><br>
Andrew> Email Address:<br><br>
Andrew> <input type="text" name="email"><br>
Andrew> <br><br>
Andrew> User Password:<br><br>
Andrew> <input type="password" name="psw"><br>
Andrew> <br><br>
Andrew> User Confirm Password:<br><br>
Andrew> <input type="password" name="psw2"><br>
Andrew> <br><br>
Andrew> Terms & Conditions<br>
Andrew> <input type="checkbox" name="terms"> I agree with terms and conditions.<br><br>
Andrew> <br><br>
Andrew> <input type="submit" value="Go" /><br>
Andrew> </form><br>
<br>
Andrew> <p>Note that the form itself is not visible.</p><br>
<br>
Andrew> <p>Also note that the default width of a text field is 20 characters.</p><br>
<br>
Andrew> </body><br>
Andrew> </html><br>
<br>
Andrew> 2015-08-07 9:36 GMT-05:00 John Stoffel <<a href="mailto:john@stoffel.org" target="_blank">john@stoffel.org</a>>:<br>
<br>
Andrew> You need to build a web page with a FORM first, then submit the data<br>
Andrew> that way to the /user URL, so it can get handled.<br>
<br>
Andrew> Try using git to clone this repository and use that as a base for your<br>
Andrew> playing around:<br>
<br>
Andrew> <a href="https://github.com/agordon/dancer_bootstrap_fontawesome_template.git" rel="noreferrer" target="_blank">https://github.com/agordon/dancer_bootstrap_fontawesome_template.git</a><br>
<br>
Andrew> I don't have any working examples handy right this second...<br>
<div><div><br>
Richard> I am hoping someone can help me understand how to get this to<br>
Richard> work as a POST instead of GET. When I do sub below as 'get'<br>
Richard> it works but when I replace 'get' with 'post' I get:<br>
<br>
Richard> --2015-08-06 13:52:05-- <a href="http://0.0.0.0:3000/user" rel="noreferrer" target="_blank">http://0.0.0.0:3000/user</a><br>
Richard> Connecting to 0.0.0.0:3000... connected.<br>
Richard> HTTP request sent, awaiting response... 404 Not Found<br>
Richard> 2015-08-06 13:52:05 ERROR 404: Not Found.<br>
<br>
Richard> package MyApp;<br>
Richard> use Dancer ':syntax';<br>
Richard> use Dancer::Plugin::FormValidator;<br>
<br>
Richard> our $VERSION = '0.1';<br>
<br>
Richard> post '/user' => sub {<br>
<br>
Richard> my $input_hash = {<br>
<br>
Richard> FName => param('firstname'),<br>
Richard> LName => param('lastname'),<br>
Richard> Email => param('email'),<br>
Richard> Terms => param('terms'),<br>
<br>
Richard> };<br>
<br>
Richard> my $number_of_defined_values = scalar grep { defined } values %{$input_hash};<br>
Richard> $number_of_defined_values = $number_of_defined_values + 0;<br>
<br>
Richard> if ($number_of_defined_values > 1) {<br>
<br>
Richard> my $error = form_validator_error( 'profile_user', $input_hash );<br>
<br>
Richard> if ( ! $error ) {<br>
Richard> #the user provided complete and validates data it's cool to proceed<br>
<br>
Richard> } else {<br>
<br>
Richard> my %hash = %$error;<br>
Richard> foreach my $k (keys %hash) {<br>
Richard> return "$k: $hash{$k}\n";<br>
<br>
Richard> }<br>
<br>
Richard> }<br>
Richard> }<br>
<br>
Richard> template 'user';<br>
<br>
Richard> ##########################################################<br>
Richard> }; ### end of sub user ###################################<br>
<br>
Richard> true;<br>
<br>
Richard> Thanks in advance for any help.<br>
<br>
Richard> _______________________________________________<br>
Richard> dancer-users mailing list<br>
Richard> <a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
Richard> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div>Andrew> _______________________________________________<br>
Andrew> dancer-users mailing list<br>
Andrew> <a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
Andrew> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br>
Andrew> _______________________________________________<br>
Andrew> dancer-users mailing list<br>
Andrew> <a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
Andrew> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br>
Andrew> --<br>
Andrew> Andrew Solomon<br>
<br>
Andrew> Mentor@Geekuni <a href="http://geekuni.com/" rel="noreferrer" target="_blank">http://geekuni.com/</a><br>
Andrew> <a href="http://www.linkedin.com/in/asolomon" rel="noreferrer" target="_blank">http://www.linkedin.com/in/asolomon</a><br>
<br>
Andrew> _______________________________________________<br>
Andrew> dancer-users mailing list<br>
Andrew> <a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
Andrew> <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<div><div>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="">-- <br><div><div dir="ltr">Andrew Solomon<div><br></div><div>Mentor@Geekuni <a href="http://geekuni.com/" target="_blank">http://geekuni.com/</a></div><div><a href="http://www.linkedin.com/in/asolomon" target="_blank">http://www.linkedin.com/in/asolomon</a><br></div></div></div>
</span></div>
<br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br></div>