forked from Mirror/pve-network
api request helper: fix conditional declaration
Reported-by: Fiona Ebner <f.ebner@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
35b9c672a0
commit
f247794dda
|
@ -262,7 +262,7 @@ sub encode_value {
|
|||
sub api_request {
|
||||
my ($method, $url, $headers, $data, $expected_fingerprint) = @_;
|
||||
|
||||
my $encoded_data = to_json($data) if $data;
|
||||
my $encoded_data = $data ? to_json($data) : undef;
|
||||
|
||||
my $req = HTTP::Request->new($method,$url, $headers, $encoded_data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue