A
Andrew
Does anyone know of a way to send the post data as reference to a hash
instead of hardcoding the post data into the useragent request? I
have tried using HTTP::Request::Common and Useragent request.
for example:
$ua->request(POST 'www.someurl.com',
[ username => 'bob',
host => 'localhost',
other => '1',
other2 => '2',
other3 => '3',
]);
I would like to to be able to use the same subroutine for multiple
post data hashes by calling
my %posthash = [ username => 'bob',host => 'localhost', other => '1',
other2 => '2', other3 => '3']
$ua->request(POST $url, \%posthash); # something like this
anyone have any ideas on how to do this?
instead of hardcoding the post data into the useragent request? I
have tried using HTTP::Request::Common and Useragent request.
for example:
$ua->request(POST 'www.someurl.com',
[ username => 'bob',
host => 'localhost',
other => '1',
other2 => '2',
other3 => '3',
]);
I would like to to be able to use the same subroutine for multiple
post data hashes by calling
my %posthash = [ username => 'bob',host => 'localhost', other => '1',
other2 => '2', other3 => '3']
$ua->request(POST $url, \%posthash); # something like this
anyone have any ideas on how to do this?