Hello,
I'm trying to use a GET request via LWP:UserAgent and I'm getting a "Can't connect" error. I also get a "URL must be absolute" error depending on whether I hard-code the URL:
### This produces "400 URL must be absolute" error
my $response = $ua->get('$url');
### This produces "500 (Internal Server Error) Can't connect to (Timeout)" error
my $response = $ua->get('
Now when I use this code trying to connect to another unix machine within our company (the url is different, of course)I have no problems.
This all started because I'm trying to use the YahooQuote.pm, but I'm getting this 400 error. Is there supposed to be some unix admin config setup somewhere?
Here is my full perl code I'm trying to execute:
use LWP::UserAgent;
use LWP::Simple;
use HTTP::Request::Common;
$ua = LWP::UserAgent->new;
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
$url = 'print "url = $url ";
my $response = $ua->get('$url');
my $marg = $response->status_line;
print "$marg ";
Thanks for any help,
Margaret
I'm trying to use a GET request via LWP:UserAgent and I'm getting a "Can't connect" error. I also get a "URL must be absolute" error depending on whether I hard-code the URL:
### This produces "400 URL must be absolute" error
my $response = $ua->get('$url');
### This produces "500 (Internal Server Error) Can't connect to (Timeout)" error
my $response = $ua->get('
Now when I use this code trying to connect to another unix machine within our company (the url is different, of course)I have no problems.
This all started because I'm trying to use the YahooQuote.pm, but I'm getting this 400 error. Is there supposed to be some unix admin config setup somewhere?
Here is my full perl code I'm trying to execute:
use LWP::UserAgent;
use LWP::Simple;
use HTTP::Request::Common;
$ua = LWP::UserAgent->new;
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
$url = 'print "url = $url ";
my $response = $ua->get('$url');
my $marg = $response->status_line;
print "$marg ";
Thanks for any help,
Margaret