Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin
In directory usw-pr-cvs1:/tmp/cvs-serv25476/lib/HTTP/WebTest/Plugin
Modified Files:
SetRequest.pm
Log Message:
Allow request params be passed as hashref
Index: SetRequest.pm
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/Plugin/SetRequest.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SetRequest.pm 2 Feb 2002 04:08:19 -0000 1.3
--- SetRequest.pm 7 Feb 2002 23:41:34 -0000 1.4
***************
*** 141,145 ****
# the application/x-www-form-urlencoded content.
my $url = URI->new('http:');
! $url->query_form(@$params);
my $query = $url->query;
--- 141,146 ----
# the application/x-www-form-urlencoded content.
my $url = URI->new('http:');
! my @params = ref($params) eq 'ARRAY' ? @$params : %$params;
! $url->query_form(@params);
my $query = $url->query;
|