mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
Fix #1355
This commit is contained in:
parent
7e6b1d9283
commit
b8f8c07cb7
@ -238,8 +238,8 @@ sub request {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $uri = URI->new($url);
|
my $uri = URI->new($url);
|
||||||
if (defined($request_options->{get_params})) {
|
if (defined($self->{get_params})) {
|
||||||
$uri->query_form($request_options->{get_params});
|
$uri->query_form($self->{get_params});
|
||||||
}
|
}
|
||||||
$req = HTTP::Request->new($request_options->{method}, $uri);
|
$req = HTTP::Request->new($request_options->{method}, $uri);
|
||||||
|
|
||||||
|
@ -98,20 +98,19 @@ sub run {
|
|||||||
$self->{http}->add_header(key => 'Content-Type', value => 'text/plain');
|
$self->{http}->add_header(key => 'Content-Type', value => 'text/plain');
|
||||||
$self->{http}->add_header(key => 'Accept', value => 'text/plain');
|
$self->{http}->add_header(key => 'Accept', value => 'text/plain');
|
||||||
|
|
||||||
my $sms_arg = {};
|
my $sms_param = [
|
||||||
|
"account=$self->{option_results}->{account}",
|
||||||
$sms_arg->{account} = $self->{option_results}->{account};
|
"login=$self->{option_results}->{login}",
|
||||||
$sms_arg->{login} = $self->{option_results}->{login};
|
"password=$self->{option_results}->{password}",
|
||||||
$sms_arg->{password} = $self->{option_results}->{password};
|
"to=$self->{option_results}->{to}",
|
||||||
$sms_arg->{to} = $self->{option_results}->{to};
|
"from=$self->{option_results}->{from}",
|
||||||
$sms_arg->{from} = $self->{option_results}->{from};
|
"message=$self->{option_results}->{message}",
|
||||||
$sms_arg->{message} = $self->{option_results}->{message};
|
"class=$self->{option_results}->{class}",
|
||||||
$sms_arg->{class} = $self->{option_results}->{class};
|
"noStop=$self->{option_results}->{nostop}",
|
||||||
$sms_arg->{noStop} = $self->{option_results}->{nostop};
|
"contentType=application/json",
|
||||||
$sms_arg->{contentType} = 'application/json';
|
"smsCoding=$self->{option_results}->{smsCoding}",
|
||||||
$sms_arg->{smsCoding} = $self->{option_results}->{smscoding};
|
];
|
||||||
|
my $response = $self->{http}->request(method => 'GET', get_param => $sms_param);
|
||||||
my $response = $self->{http}->request(method => 'GET', get_params => $sms_arg);
|
|
||||||
|
|
||||||
my $decoded;
|
my $decoded;
|
||||||
eval {
|
eval {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user