Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, How can I know how the key value parameters are sent for the POST, when using www::mechanize module? Thanks -H

Replies are listed 'Best First'.
Re: Post parameters with www::mechanize
by Anonymous Monk on Jul 28, 2005 at 02:15 UTC
      Ok. let me explain you what I really wanted. I am able to successfully post using the mechanize module methods. But I am writing the same thing in another module thats not doing it conistently. So I wanted to check how the mechanize module was sending the key, value parameters. Can any one please suggest how I can see whats being posted? Thanks a lot -H
        If i understand you, yuou want to build a similar thing yourself? why not look at the code, you'll see anything you need there.
        e.g.: www mechanize uses these modules, to support it's functions:
        use HTTP::Request 1.30; use LWP::UserAgent 2.003; use HTML::Form 1.00; use HTML::TokeParser; use URI::URL;
        update:
        I do think it uses libwww-perl for posting, e.g.:
        use HTTP::Request::Common; my $ua = LWP::UserAgent->new; $ua->request(POST 'http://somewhere/foo', [foo => bar, bar => foo]);

        "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.