Basically I would like to have a POST will have the content length and
at the end a data section containing at the end
name=Philip&gender=mail
which can be read on the server side CGI with
query->param('name')
and
query->param('gender')
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 09, 2005 11:32 AM
To: Tham, Philip
Cc: [email protected]
Subject: Re: Passing parameters into post
> It seems that to pass paramenters into a post I can use the following
> method
>
> my $rq=HTTP::Request->new(POST => http://www.posturl.com,["name" =>
> "Philip", "gender" => "male"]);
Well, fixing the typo of missing quotes around the URL, what you will
have done there is created a request with a couple of curious HTTP
headers "name" and "gender". And absolutely no content inside the post
data.
You can use HTTP::Request::Common which provides a helper function POST
that will generate a properly formated HTTP::Request object.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>