use IO::Socket::SSL qw();
use LWP::UserAgent qw();
my $ua = LWP::UserAgent->new(ssl_opts => {
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE,
verify_hostname => 0, # this key is likely going to be removed in
+future LWP >6.04
});
Then set the ua attribute on the Frontier::Client instance. | [reply] [d/l] |
| [reply] |
This is the part I am having trouble with. Frontier::Client doesn't seem to allow me to do this!?
Use the Source, Luke, look inside
$self->{'ua'} = LWP::UserAgent->new;
$self->{'ua'}->proxy('http', $self->{'proxy'})
if(defined $self->{'proxy'});
$self->{'rq'} = HTTP::Request->new (POST => $self->{'url'});
$self->{'rq'}->header('Content-Type' => 'text/xml');
| [reply] [d/l] |
First, I've never actually used
Frontier::Client. Second, if I was inclined to use it, I would probably go with
something like this:
#!/usr/bin/perl -l
use strict;
use warnings;
use LWP::UserAgent;
use Frontier::Client;
use Data::Dumper::Concise;
my $ua = LWP::UserAgent->new(
ssl_opts => { verify_hostname => 0 },
protocols_allowed => ['https'],
);
my $req = HTTP::Request->new(
GET => 'https://pause.perl.org',
);
my $res = $ua->request($req);
print $res->code;
my $server = Frontier::Client->new(
url => 'https://pause.perl.org',
encoding => 'ISO-8859-1',
debug => 1,
);
my $date_time = $server->call('date_time');
print Dumper( $date_time );
I was was just trying to make it work, so feel free to add
to or subtract from ssl_opts. Good luck:-). | [reply] [d/l] |
First, I've never actually used Frontier::Client. Second, if I was inclined to use it, I would probably go with something like this:
Double request? Smart!
| [reply] |
you could also write a wrapper shell script with that environment variable (envvar) in it. You then start the perl scripts from that wrapper shell script.
Or you could add your envvar to your profile, then all the processes you start would inherit it (not ideal if you want to verify the certificates, but if you don't care ...). | [reply] |