UI: Add function to get remote file

Similar to the OBS1 file where you can optionally get the signature if
available in the header (for auto-updating)
This commit is contained in:
jp9000
2017-02-20 04:44:40 -08:00
parent 8bc516afe7
commit 33e4494014
2 changed files with 121 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
#pragma once
#include <QThread>
#include <vector>
#include <string>
class RemoteTextThread : public QThread {
@@ -40,3 +41,13 @@ public:
: url(url_), contentType(contentType_), postData(postData_)
{}
};
bool GetRemoteFile(
const char *url,
std::string &str,
std::string &error,
long *responseCode = nullptr,
const char *contentType = nullptr,
const char *postData = nullptr,
std::vector<std::string> extraHeaders = std::vector<std::string>(),
std::string *signature = nullptr);