Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
here is my code snippet:501 (Not Implemented) Protocol scheme 'https' is not supported
use HTTP::Request; use LWP::UserAgent; $url = "https://some_web_site.com my $ua = new LWP::UserAgent; $ua->agent("Dell/0.1 ".$ua->agent); ### some things I was goofing with - didn't do much #$ua->protocols_allowed( ['http','https'] ); #if($ua->is_protocol_supported('https')) #{ print "HTTPS IS SUPPORTED!!!<br>"; } #else { print "HTTPS IS NOT SUPPORTED!!!<br>"; } #if($ua->is_protocol_supported('http')) #{ print "HTTP IS SUPPORTED!!!<br>"; } #else { print "HTTP IS NOT SUPPORTED!!!<br>"; } my $req = HTTP::Request->new('POST', $url); $req->content_type('text/xml'); $req->content("some content here"); my $res = $ua->request($req); if($res->is_success) { print "Ta da....successs!!!"; } else { # this usually returns: "501 'https' not implemented print $res->as_string()."<hr>"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP::UserAgent https problems
by blakem (Monsignor) on Aug 09, 2001 at 01:39 UTC | |
by Anonymous Monk on Aug 09, 2001 at 02:16 UTC |