From 57feb3e8e9a6ec65b96b0e7140433a20a2bd3ecc Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 22 Dec 2020 17:51:51 +0100 Subject: [PATCH] enhance vmware vcsa curl --- apps/vmware/vcsa/restapi/custom/api.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/vmware/vcsa/restapi/custom/api.pm b/apps/vmware/vcsa/restapi/custom/api.pm index 5a2d8813a..40b0bd5e6 100644 --- a/apps/vmware/vcsa/restapi/custom/api.pm +++ b/apps/vmware/vcsa/restapi/custom/api.pm @@ -150,12 +150,12 @@ sub authenticate { if ($has_cache_file == 0 || !defined($session_id)) { my $content = $self->{http}->request( method => 'POST', + query_form_post => '', url_path => '/rest/com/vmware/cis/session', credentials => 1, basic => 1, username => $self->{api_username}, password => $self->{api_password}, - warning_status => '', unknown_status => '', critical_status => '', - curl_backend_options => { header => ['Content-Length: 0'] }, + warning_status => '', unknown_status => '', critical_status => '' ); if ($self->{http}->get_code() != 200) { $self->{output}->add_option_msg(short_msg => "Login error [code: '" . $self->{http}->get_code() . "'] [message: '" . $self->{http}->get_message() . "']");