I am trying to understand why I do not see params with $ .post ("/ url /", {wtf: 2}).
I use this perl:
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header("text/javascript");
print "'no'";
use Data::Dumper;
warn Dumper({ (map {$_=>$cgi->param($_ )} $cgi->param), postdata=>$cgi->param("POSTDATA") });
When I output $ .get ("/ url", {wtf: 2}), I get the expected results and find wtf equal to 2 in the logs. When I use $ .post ("/ url /", {wtf: 2}), I don’t see any parameters at all (just $ VAR1 = {postdata => undef} in the logs).
What am I missing?
Firebug shows that: Transfer-Encoding is "chunked" and Content-Type is "application / x-www-form-urlencoded; charset = UTF-8". In addition, the Mail tab displays the arguments in the request, but there is no joy from the CGI.
source
share