LWP call
Tac/Smokescreen Action Network (tac@smokescreen.org)
Tue, 9 Jan 2001 16:38:23 -0500
I'm creating a module to parse out XML into and LWP call, and am having a
difficult time understanding the request object for POST. For GET, it's
easier, since the URL just needs to get the query vars.
For example, I have the following
<QUERY URL="somedomain.com/enterdata.pl" METHOD="POST">
<COOKIE NAME="SessionID" Value="9284294">
<COOKIE NAME="UserID" Value="A22">
<FORMVARS>
<VAR NAME="Firstname" VALUE="Michael">
<VAR NAME="Collection" VALUE="144"> <!-- these come from a
<VAR NAME="Collection" VALUE="214">
<!-- more vars that I don't know ahead of time -->
</FORMVARS>
</QUERY>
As I mentioned before, when this is a GET, I can add the formvars to $u and
use
my $req = HTTP::Request->new('GET', $u);
$req->header('Cookie' => $cookie_header);
My question is, how do I add formvars to a POST request? Create a hash with
them in it, and then...?
TIA,
Tac