
Demerzel
Novice
Sep 21, 2011, 7:59 AM
Post #1 of 2
(4233 views)
|
post array with LWP
|
Can't Post
|
|
I have something like this:
my $ua = LWP::UserAgent->new(); my $req = POST 'https://ssl.test/?m=documentadd&print=1&override=1&original=1 ', [ document =>\%document ]; I tried to do it in different ways, now my %document
my %document ={ "title"=> "xxxxxx", "fromdate"=> "1", "todate"=> "2"} My php file returns information that $_POST['document'] is an array (HASH(0x92f7aa8)) but I cant read "title".... How can I make $_POST['document']['title'] readable? I triend this:
$resp = $ua->post('http://someurl/test.php', 'Content_Type' => 'multipart/form-data' , 'Content => [ \%form ]'); with similar outcome.
|