fix bug when method is DELETE

This commit is contained in:
Hans 2020-09-20 21:44:22 +08:00
parent 29cf4c48cd
commit 6eedef4137
1 changed files with 1 additions and 1 deletions

View File

@ -439,7 +439,7 @@ sub freenas_api_call {
$freenas_rest_connection = $freenas_server_list->{$apihost};
$freenas_global_config = $freenas_global_config_list->{$apihost};
my $json_data = (defined $data) ? encode_json($data) : undef;
$freenas_rest_connection->$method($path, $json_data);
$freenas_rest_connection->request($method, $path, $json_data);
syslog("info", (caller(0))[3] . " : successful");
return;
}