I'm trying to figure out why I'm not seeing params with $.post("/url/", {wtf: 2}).
I'm using 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 issue a $.get("/url", {wtf: 2}), I get the results I expect and find wtf is 2 in the logs. When I use $.post("/url/", {wtf: 2}), I don't seem to get any params at all (just a $VAR1 = { postdata=>undef } in the logs).
What am I missing?
Firebug reveals that: Transfer-Encoding is "chunked" and Content-Type is "application/x-www-form-urlencoded; charset=UTF-8". Further, the Post tab seems to show the arguments in the request, but no joy from CGI.