Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP request on Win2K

Status
Not open for further replies.

derekmonner

Programmer
Sep 25, 2000
1
US
Hi all,

Quick system rundown first:
Windows 2000, ActivePerl 5.6.0 (full)

I'm having trouble when moving a script from my old unix server to this new Win2k server. I've gotten all the bugs worked out, except that I need to make an HTTP request. Now, I don't think that the request is being made at all. When the script is done, the $res->code and $res->content variables are both blank. I just don't know how to fix this... Is it a syntax difference between unix and Win2k? Is there a permissions problem somewhere? Any Ideas???

==========================

$url="
use lib "C:/Perl/html/site/lib/";
require LWP::UserAgent;
require HTTP::Request;
$| = 1;

my $qurl = "$url";
my $ch = LWP::UserAgent->new;
my $snd = HTTP::Request->new(GET => $qurl);
$snd->header(Accept => 'text/html');
my $res = $ch->request($snd);
my $code= $res->code;
my $content= $res->content;

==========================

Thanks People,

Derek Monner [sig][/sig]
 
I am guessing that you have thought of this already but just to check, you do have the relevant modules installed on the new system right?

Other than that I can't see why the code above should work differently. [sig]<p>fortytwo<br><a href=mailto:will@hellacool.co.uk>will@hellacool.co.uk</a><br><a href= test site</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top