From a1ea72d719b63a4d2b6421ce2e53b7e3ab12a8a1 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 23 Feb 2024 18:50:28 +0300 Subject: Add curl constructors which allow to adjust curl command line --- libbutl/curl.txx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libbutl/curl.txx') 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 (out), mp, out_data), std::forward (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, -- cgit v1.1