aboutsummaryrefslogtreecommitdiff
path: root/libbutl/curl.txx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-02-23 18:50:28 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-02-26 16:38:49 +0300
commita1ea72d719b63a4d2b6421ce2e53b7e3ab12a8a1 (patch)
tree8c5e9e1c044586cee0cc16dd66e78f70b4d33c3f /libbutl/curl.txx
parent14049ee7c5880b9e33a3e295d19ed6b36edab567 (diff)
Add curl constructors which allow to adjust curl command line
Diffstat (limited to 'libbutl/curl.txx')
-rw-r--r--libbutl/curl.txx8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbutl/curl.txx b/libbutl/curl.txx
index ee08145..fc74470 100644
--- a/libbutl/curl.txx
+++ b/libbutl/curl.txx
@@ -65,11 +65,12 @@ namespace butl
O&& out,
E&& err,
method_type m,
+ flags fs,
const std::string& url,
A&&... options)
{
method_proto_options mpo;
- method_proto mp (translate (m, url, mpo));
+ method_proto mp (translate (m, url, mpo, fs));
io_data in_data;
io_data out_data;
@@ -81,8 +82,9 @@ namespace butl
map_out (std::forward<O> (out), mp, out_data),
std::forward<E> (err),
"curl",
- "-s", // Silent.
- "-S", // But do show diagnostics.
+ ((fs & flags::no_sS) == flags::none
+ ? "-sS" // Silent but do show diagnostics.
+ : nullptr),
mpo,
in_data.options,
out_data.options,