in reply to Re: Post with parameters using hash
in thread Post with parameters using hash

Sorry the error is that the server is rejecting it, saying it's an invalid input.

This code works
$request = POST "http://www.server.com", Content => [ $formname1 => +'formvalue1', $formname2 => 'formvalue2' ];
While this one causes the server to redirect to an error page. However, I have to do it this way, because I need to build the form parameters using a for loop.
$hiddenhash{$formname1} = 'formvalue1'; $hiddenhash{$formname2} = 'formvalue2'; $request = POST "http://www.server.com", Content => [ %hiddenhash ];

Replies are listed 'Best First'.
Re: Re: Re: Post with parameters using hash
by symŽ (Acolyte) on May 03, 2001 at 21:24 UTC
    Funny I am having the same exact situation today, can't use a hash for the parameters.
    Tried a bunch of different ways.
    This code:
    $request = POST "http://www.server.com", Content => [ %hiddenhash ];
    simply doesn't work for me (or for the anonymous poster) Strange.. there is nothing in the hash that should be acting weird, no odd chars....does it need to be escaped or something?