Re: Lwp Post Problem

Re: Lwp Post Problem

am 11.09.2004 08:19:44 von ced

In article ,
Sure wrote:
>Hello All,
>I want to update a form using the LWP & HTTP method. It was
>working fine when I am updating the values like this
>
>$ua = LWP::UserAgent->new;
>$url ='http://xxx.be/cgi-bin/viewauth/Tracking/TestProjectAgainIn itialDevStory#edittable2';
>use HTTP::Request::Common;
>
>my $res = $ua->request(POST $url,
> Content_Type =>'form-data',
> Content => [
> ettablenr => '2',
> etcell2x1 =>'Task',
> etcell2x2 =>'2',
> etcell2x3 =>'3',
> etcell2x4 =>'4',
> etcell2x5 =>'High',
> etcell2x6 =>'SureshC',
> etcell2x7 =>'CSuresh',
> etcell2x8 =>'Twiki Data Updation',
> etrows => '2',
> etsave =>'Save table']);
>
>
>It was not working when I store the value into a Variable. Like This.
>
>$postStr = ettablenr => '2', etcell2x1 =>'Task', etcell2x2 =>'2',
>etcell2x3 =>'3', etcell2x4 =>'4', etcell2x5 =>'High', etcell2x6
>=>'SureshC', etcell2x7 =>'CSuresh', etcell2x8 =>'Twiki Data
>Updation', etrows => '2', etsave =>'Save table']);
>

The above statement won't compile...

>$ua = LWP::UserAgent->new;
>my $res = $ua->request(POST $url, Content_Type=>'form-data', Content
>=>[$postStr]);
>

--
Charles DeRykus