in reply to Removing http headers from LWP::Useragent request

Simply use the ->content method instead of ->as_string (See HTTP::Request manpage)

Replies are listed 'Best First'.
Re^2: Removing http headers from LWP::Useragent request
by criz (Novice) on Jun 06, 2005 at 16:59 UTC
    Thanks! On a related note, is it possible to parse the request prior to printing it to output? There are certain fields that I would like to suppress from from the file.
      sure -- you can store the content in a variable first before printing... also, the headers are available via the ->header() method (See HTTP::Headers docs).
      my $content = $ua->request($req)->content; # munge $content here # $content = uc $content; print OUT $content; my $title = $ua->request($req)->header('Title'); warn $title; # 'Empty Result'
        Thanks, that did the trick