develooper Front page | perl.libwww | Postings from January 2002

Re: https client by LWP

Thread Previous
From:
Robert Barta
Date:
January 19, 2002 16:39
Subject:
Re: https client by LWP
Message ID:
20020120103311.C27962@namod.qld.bigpond.net.au
On Tue, Jan 08, 2002 at 03:33:49AM +0300, UpocoY wrote:
> I'm trying to write https client by LWP
> anybody know how use https by LWP?
> standart documents have to little information.
> i need examples =)

Just stumbled across this one. No real magic here. (Except
having everything installed). LWP handles everything for
you.

require LWP::UserAgent;
$ua = LWP::UserAgent->new;

$request = HTTP::Request->new("GET", "https://secure.kpnqwest.at/");

$response = $ua->request($request);
if ($response->is_success) {
    print $response->content;
} else {
    print $response->message;
} 

\rho

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About