my ($url, %xopts) = @_;
# Ok404 => 1 means give undef for 404
# AccessBase => 'archive-query' (eg)
+ # CurlOpts => { key => value }
use WWW::Curl::Easy;
$setopt->(CURLOPT_NOSIGNAL, 1);
$setopt->(CURLOPT_WRITEDATA, \$response_body);
+ my $xcurlopts = $xopts{CurlOpts} // { };
+ keys %$xcurlopts;
+ while (my ($k,$v) = each %$xcurlopts) { $setopt->($k,$v); }
+
if ($xopts{AccessBase} && $url =~ m#^https://([-.0-9a-z]+)/#) {
foreach my $k ("$xopts{AccessBase}-tls-key",
"$xopts{AccessBase}-tls-curl-ca-args") {