Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

HTTP request on Win2K

HTTP request on Win2K

HTTP request on Win2K

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???



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

RE: HTTP request on Win2K

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.

my test site

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close