Help for this page

Select Code to Download


  1. or download this
    C:\>perl -MLWP::Debug=+ foobar.pl
    LWP::UserAgent::new: ()
    ...
    User-Agent: My agent 10
    
    ***********snip**********
    
  2. or download this
    sub write_request {
      my ($self, $request, $socket, $fullpath, $arg, $timeout, $proxy) = @
    +_;
    ***********snip**********
      my $h = $request->headers->clone;
    ***********snip**********
    
  3. or download this
    ***********snip**********
        my ($agent, $from, $timeout, $cookie_jar,
    ...
        $request->init_header('User-Agent' => $agent) if $agent;
    
    ***********snip**********