make common_download_file_single/multiple public

This commit is contained in:
Sigbjørn Skjæret
2025-05-28 09:50:41 +02:00
committed by GitHub
parent 1e8659e65a
commit 2d2e059f4f
2 changed files with 9 additions and 2 deletions

View File

@@ -87,3 +87,10 @@ struct common_remote_params {
};
// get remote file content, returns <http_code, raw_response_body>
std::pair<long, std::vector<char>> common_remote_get_content(const std::string & url, const common_remote_params & params);
// download one single file from remote URL to local path
bool common_download_file_single(const std::string & url, const std::string & path, const std::string & bearer_token, bool offline);
// download multiple files from remote URLs to local paths
// the input is a vector of pairs <url, path>
bool common_download_file_multiple(const std::vector<std::pair<std::string, std::string>> & urls, const std::string & bearer_token, bool offline);