diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-10-03 05:48:46 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-10-03 05:48:46 +0200 |
commit | ca07c2be3bba3291f59d160eac13831c85d16550 (patch) | |
tree | 3b0749a086f517dae3ff6591b848c2b77413f813 /src/DownloadUtils.cpp | |
parent | 38874aa9c8bfcf12bd1ceef013a2342da5a0eeea (diff) |
Remove unused code
Diffstat (limited to 'src/DownloadUtils.cpp')
-rw-r--r-- | src/DownloadUtils.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
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<CommandArg> create_command_args_from_form_data(const std::vector<FormData> &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 |