From 81db91349cdfc889db912ce8b7672c4f477b0daf Mon Sep 17 00:00:00 2001 From: omercier Date: Mon, 17 Feb 2025 11:07:18 +0100 Subject: [PATCH] fix tests by avoiding json-decoding POST/PATCH/DELETE results --- src/apps/vmware/vsphere8/custom/api.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/vmware/vsphere8/custom/api.pm b/src/apps/vmware/vsphere8/custom/api.pm index 6df59d5d72..78153d5125 100644 --- a/src/apps/vmware/vsphere8/custom/api.pm +++ b/src/apps/vmware/vsphere8/custom/api.pm @@ -211,7 +211,7 @@ sub try_request_api { } - my $decoded = ($content eq '') ? {} : centreon::plugins::misc::json_decode($content); + my $decoded = ($method eq 'GET') ? centreon::plugins::misc::json_decode($content) : {}; return $decoded; }