From ca07c2be3bba3291f59d160eac13831c85d16550 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Oct 2020 05:48:46 +0200 Subject: Remove unused code --- src/DownloadUtils.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/DownloadUtils.cpp') diff --git a/src/DownloadUtils.cpp b/src/DownloadUtils.cpp index e748198..dc99028 100644 --- a/src/DownloadUtils.cpp +++ b/src/DownloadUtils.cpp @@ -75,26 +75,4 @@ namespace QuickMedia { return download_result; } } - - std::vector create_command_args_from_form_data(const std::vector &form_data) { - // TODO: This boundary value might need to change, depending on the content. What if the form data contains the boundary value? - const std::string boundary = "-----------------------------119561554312148213571335532670"; - std::string form_data_str; - for(const FormData &form_data_item : form_data) { - form_data_str += boundary; - form_data_str += "\r\n"; - // TODO: What if the form key contains " or \r\n ? - form_data_str += "Content-Disposition: form-data; name=\"" + form_data_item.key + "\""; - form_data_str += "\r\n\r\n"; - // TODO: What is the value contains \r\n ? - form_data_str += form_data_item.value; - form_data_str += "\r\n"; - } - // TODO: Verify if this should only be done also if the form data is empty - form_data_str += boundary + "--"; - return { - CommandArg{"-H", "Content-Type: multipart/form-data; boundary=" + boundary}, - CommandArg{"--data-binary", std::move(form_data_str)} - }; - } } \ No newline at end of file -- cgit v1.2.3