Re: [vox-tech] LWP module of Perl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] LWP module of Perl
Mark,
You have any idea why this bit of code doesn't work? I'm trying to access a
secure site:
Is there something special (like use a different package...) to access a https
site using LWP? My script below works fine going against a http page but not
against an https site.
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
#********** This Works ***********
my $uri = URI->new('http://www.yahoo.com');
#********** This Doesn't ***********
#my $uri =
URI->new('https://some.securesite.com/cgi/purchase.asp?item_id=700314996616303&i
tem_code=1');
my $ua = new LWP::UserAgent;
$ua->agent("MyAgent/0.1 ". $ua->agent);
my $request = new HTTP::Request('GET' , $uri );
my $response = $ua->request($request);
print $response->content;
Jay Strauss
jstrauss@bazillion.com
(h) 773.935.5326
(c) 312.617.0264
----- Original Message -----
From: "Jay" <jstrauss@bazillion.com>
To: <vox-tech@franz.mother.com>
Sent: Wednesday, December 20, 2000 6:08 PM
Subject: Re: [vox-tech] LWP module of Perl
> You're right, I'm finding examples in the perldoc. I didn't understand
perldoc
> till now. Now I'm perldocing everything (and making steady (but slow)
> progress), and learning object oriented perl in the process.
>
> Jay
>
> Jay Strauss
> jstrauss@bazillion.com
> (h) 773.935.5326
> (c) 312.617.0264
>
> ----- Original Message -----
> From: "Micah Cowan" <micah@cowanbox.com>
> To: <vox-tech@franz.mother.com>
> Sent: Wednesday, December 20, 2000 1:37 PM
> Subject: Re: [vox-tech] LWP module of Perl
>
>
> > On Wed, Dec 20, 2000 at 08:59:21AM -0600, Jay wrote:
> > > Do anyone have any experience using the LWP (libwww) module of perl? I'm
> trying
> > > to use it, but it is wholly short of examples?
> >
> > Are you serious? There're plenty of examples. Under the LWP manpage,
> > look under the subtly titled "An Example". And other examples below that.
> >
> > You will also probably find the LWP::UserAgent manpage to be
> > of value; though that one /doesn't/ have much for examples...
> >
> > ;)
> >
> > Micah
> >
>
>
|