Allow specifying content-type for posts instead of hardcoding.

This commit is contained in:
Henrik Rydgård
2023-06-17 23:18:23 +02:00
parent 2de510432d
commit 31a6cecef9
2 changed files with 2 additions and 1 deletions
+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);