in reply to Re: POST on LWP::Simple
in thread POST on LWP::Simple

How then do I use POST using LWP::UserAgent? Can you give an example? Thanks. Gorby.

Replies are listed 'Best First'.
Re: Re: Re: POST on LWP::Simple
by moxliukas (Curate) on Feb 08, 2004 at 18:32 UTC

    Straight from lwpcook:

    Lazy people use the HTTP::Request::Common module to set up a suitable POST request message (it handles all the escaping issues) and has a suitable default for the content_type:
    use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = POST 'http://www.perl.com/cgi-bin/BugGlimpse', [ search => 'www', errors => 0 ]; print $ua->request($req)->as_string;
Re: POST on LWP::Simple
by Abigail-II (Bishop) on Feb 09, 2004 at 09:38 UTC
    How then do I use POST using LWP::UserAgent?
    Did you bother to read the documentation of LWP::UserAgent? If so, could you indicate which part about using POST was unclear to you?

    Abigail