mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-31 01:24:35 +02:00
Update src/apps/exense/step/restapi/custom/api.pm
Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
This commit is contained in:
parent
0c1ab9ad7b
commit
40bb36b64c
@ -160,11 +160,7 @@ sub get_session_id {
|
||||
(defined($md5_secret_cache) && $md5_secret_cache ne $md5_secret)
|
||||
) {
|
||||
my $json_request = { username => $self->{api_username}, password => $self->{api_password} };
|
||||
my $encoded;
|
||||
eval {
|
||||
$encoded = encode_json($json_request);
|
||||
};
|
||||
if ($@) {
|
||||
my $encoded = centreon::plugins::misc::json_encode($json_request) or {
|
||||
$self->{output}->add_option_msg(short_msg => 'cannot encode json request');
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user