Folks,
 
How do I read the response header information.
 
I am using LWP gets
code snippet......
 
use LWP::Debug qw(+ -conns);
use LWP::UserAgent;
use HTTP::Request::Common;
use HTTP::Response;
use HTTP::Cookies;
use HTTP::Headers;
use IO::Socket::SSL;

 my $ua = LWP::UserAgent->new; $ua->timeout(20);
 $ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR
1.1.4322)');
 $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt",autosave => 1));

    print "\n---------------- Getting Home Page ---------------------\n" if
$dbug;
 push @LOG, "---------------- Getting Home Page ---------------------\n";
 push @LOG, "Getting $baseurl/$home......";
 print "Getting $baseurl/$home......" if $dbug;
 my $response = $ua->get("$baseurl/$home");
 $home_page = $response->as_string;
 
 
 
 
How would I code to read the Response headers?
 
TIA,
 

David M. Funk 
President/CEO 
Tivoli Certified Enterprise Consultant 
Specializing in Network and Systems Management Solutions 
Trinity Solutions 
604 Cassandra Dr. 

Suite 204
Cranberry Twp., PA 16066 
Phone: 724-316-0721 
Fax:     724-772-7889 
email: [EMAIL PROTECTED] 

 

 
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to