lemonldap-ng/lemonldap-ng-common/lib/Lemonldap/NG/Common/UserAgent.pm
2017-02-15 15:08:23 +00:00

15 lines
330 B
Perl

package Lemonldap::NG::Common::UserAgent;
use LWP::UserAgent;
sub new {
my ( $class, $conf ) = @_;
my $opts = $conf->{lwpOpts} || {};
$opts->{ssl_opts} = $conf->{lwpSslOpts} if ( $conf->{lwpSslOpts} );
my $ua = LWP::UserAgent->new(%$opts);
push @{ $ua->requests_redirectable }, 'POST';
return $ua;
}
1;