Hi.
Can you tell me what is the best practice to compose and escape params, when using LWP.
Currently I am doing that:
which is really ugly and I have forgotten to escape the params(I think that there is a way automatically to do that).
Corwin
Can you tell me what is the best practice to compose and escape params, when using LWP.
Currently I am doing that:
Code:
my $params = shift;
my $params_as_str;
if ( ref $params eq 'HASH' && $params ) {
foreach my $k ( keys %{$params} ) {
$params_as_str .= "$k=$params->{$k}&";
}
chop $params_as_str;
}
Corwin