Clean ua() usage
This commit is contained in:
parent
64886f4005
commit
092bed086e
@ -22,6 +22,7 @@ sub ua {
|
|||||||
# TODO : LWP options to use a proxy for example
|
# TODO : LWP options to use a proxy for example
|
||||||
$_ua = LWP::UserAgent->new() or $self->abort($@);
|
$_ua = LWP::UserAgent->new() or $self->abort($@);
|
||||||
push @{ $_ua->requests_redirectable }, 'POST';
|
push @{ $_ua->requests_redirectable }, 'POST';
|
||||||
|
$self->ua()->env_proxy();
|
||||||
return $_ua;
|
return $_ua;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,8 +239,6 @@ sub deleteCasSession {
|
|||||||
sub callPgtUrl {
|
sub callPgtUrl {
|
||||||
my ( $self, $pgtUrl, $pgtIou, $pgtId ) = splice @_;
|
my ( $self, $pgtUrl, $pgtIou, $pgtId ) = splice @_;
|
||||||
|
|
||||||
$self->ua()->env_proxy();
|
|
||||||
|
|
||||||
# Build URL
|
# Build URL
|
||||||
my $url = $pgtUrl;
|
my $url = $pgtUrl;
|
||||||
$url .= ( $pgtUrl =~ /\?/ ? '&' : '?' );
|
$url .= ( $pgtUrl =~ /\?/ ? '&' : '?' );
|
||||||
@ -253,7 +251,6 @@ sub callPgtUrl {
|
|||||||
|
|
||||||
# Return result
|
# Return result
|
||||||
return $response->is_success();
|
return $response->is_success();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user