> I wonder why GET wouldn't work? Any ideas of the reason?

GET tells the receiving app to look at the query string (the part of the URL
after the "?"), POST tells it to look at the body content.  You passed the
data in the body content, NOT the query string... to the CGI module was
looking in the wrong place for the data.

If you wanted to sent a GET, you could do it like this...

my $req = new HTTP::Request(GET => 'http://joemama.com/howdy.cgi?hi=dummy');
my $res = $agt->request($req);

Rob

-----Original Message-----
From: Dan Muey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 2:53 PM
To: [EMAIL PROTECTED]
Subject: RE: Query string to LWP requests


> my $agt = new LWP::UserAgent;                                 
>               # works
> my $req = new HTTP::Request(GET => 
> 'http://joemama.com/howdy.cgi'); # works
> 
> #What am I doing 
> wrong here? The script I'm getting just has 
> #print param('hi'); so I don't thignk it's a get/post issue.

I was totally wrong! I change GET => to POST => above and it worked el
prefecto!

I wonder why GET wouldn't work? Any ideas of the reason?

> 
> $req->content_type('application/x-www-form-urlencoded'); 
> $req->content('hi=dummy');                              

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to