develooper Front page | perl.libwww | Postings from August 2001

Http post problem

Thread Previous | Thread Next
From:
Ben Goswami
Date:
August 1, 2001 09:50
Subject:
Http post problem
Message ID:
016401c11aaa$0b2d3880$9d14a8c0@BENG
Hi,
I'm having problem submitting a form post.  Here is the code.  I'm getting
an error
***
Can't locate object method "method" via package "POST" at
C:/perl/site/lib/LWP/UserAgent.pm line 163.
******
Code:

my $ua = new LWP::UserAgent;
 $ua->timeout(300);

  my $res = $ua->request(POST => 'www.abc.com/cgi-bin/test.cgi',
      [ var1=> 'This is a Test',
      var2=>'male',
      var3=> '45' ] );
      if ($res->is_success) {
...
}

Any idea?

if I construct the request seperately and pass it to ua 
I get an error some thing like 
"Can't clone ... at line ... at message.pm"



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About