In support of #932570. Our intended other caller doesn't have a
$data. No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-sub api_query_raw ($$;$) {
- my ($data, $subpath, $ok404) = @_;
- badcfg __ "ftpmasterapi archive query method takes no data part"
- if length $data;
+sub api_query_raw ($;$) {
+ my ($subpath, $ok404) = @_;
my @cmd = archive_api_query_cmd($subpath);
my $url = $cmd[$#cmd];
push @cmd, qw(-w %{http_code});
my @cmd = archive_api_query_cmd($subpath);
my $url = $cmd[$#cmd];
push @cmd, qw(-w %{http_code});
sub api_query ($$;$) {
my ($data, $subpath, $ok404) = @_;
use JSON;
sub api_query ($$;$) {
my ($data, $subpath, $ok404) = @_;
use JSON;
- my $json = api_query_raw $data, $subpath, $ok404;
+ badcfg __ "ftpmasterapi archive query method takes no data part"
+ if length $data;
+ my $json = api_query_raw $subpath, $ok404;
return undef unless defined $json;
return decode_json($json);
}
return undef unless defined $json;
return decode_json($json);
}