Add LWP options (closes: #1065)
parent
c702ba763b
commit
1e7b2c4a39
@ -0,0 +1,14 @@ |
||||
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; |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue