Output is:my $qurl = 'legitmate url (tested -- fails for many)'; my $uasnd = new HTTP::Request ('GET', $qurl); $uasnd->header('Accept' => 'text/html'); my $res = $ua->request($uasnd); use Data::Dumper; print STDERR "RES: ".Dumper( $res )."\n"; my $code= $res->code; # RETURNS 500 my $content= $res->content; # NADA
Something tells me this is going to be something stupid that I have forgotten, but I have asked several others about this. Anyone had a similar experience or know what this could be? As always, your time and assistance is much appreciated.RES: $VAR1 = bless( { '_content' => '', '_rc' => 500, '_headers' => bless( { 'client-date' => 'Wed, 03 Mar 2004 17: +37:09 GMT' }, 'HTTP::Headers' ), '_msg' => 'Can\'t connect to domainname.net:80 (Bad hostname \ +'domainname.net\')', '_request' => bless( { '_content' => '', '_uri' => bless( do{\(my $o = 'http:// +domainname.net/?param1=1¶m2=2')}, 'URI::http' ), '_headers' => bless( { 'user-agent' => +'libwww-perl/5.69', 'accept' => 'tex +t/html' }, 'HTTP::Headers +' ), '_method' => 'GET' }, 'HTTP::Request' ) }, 'HTTP::Response' );
bassplayer
In reply to LWP::UserAgent connection problem as CGI by bassplayer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |