Allow specifying content-type for posts instead of hardcoding.

This commit is contained in:
Henrik Rydgård committed 2023-06-17 23:18:23 +02:00
1 parent 2de510432d
commit 31a6cecef9
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -604,8 +604,8 @@ std::shared_ptr<Download> Downloader::StartDownloadWithCallback(
std::shared_ptr<Download> Downloader::AsyncPostWithCallback(
const std::string &url,
const std::string &postData,
const std::string &postMime,
std::function<void(Download &)> callback) {
std::string postMime = "application/x-www-form-urlencoded";
std::shared_ptr<Download> dl(new Download(RequestMethod::POST, url, postData, postMime, Path()));
dl->SetCallback(callback);
newDownloads_.push_back(dl);
+1
View File
@@ -202,6 +202,7 @@ public:
std::shared_ptr<Download> AsyncPostWithCallback(
const std::string &url,
const std::string &postData,
const std::string &postMime, // Use postMime = "application/x-www-form-urlencoded" for standard form-style posts, such as used by retroachievements.
std::function<void(Download &)> callback);
// Drops finished downloads from the list.